From 921321c7d2fe9cbff260712fe3464b9c3b5fc04a Mon Sep 17 00:00:00 2001 From: yfzhe Date: Tue, 6 Aug 2024 22:48:33 +0800 Subject: [PATCH] eval-bot: empty environment variables when eval code --- eval-bot/eval.rkt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eval-bot/eval.rkt b/eval-bot/eval.rkt index 0ed62a1..fa597b6 100644 --- a/eval-bot/eval.rkt +++ b/eval-bot/eval.rkt @@ -34,6 +34,7 @@ [sandbox-propagate-breaks #f] [sandbox-propagate-exceptions #f] [sandbox-make-code-inspector current-code-inspector] + [sandbox-make-environment-variables make-environment-variables] [sandbox-memory-limit 64]) (define evaluator (make-module-evaluator (format "#lang ~a" lang))) @@ -115,6 +116,10 @@ (caddr (car result)))) (eval-code "(+ 1 2") "syntax error") + (check-equal? (eval-code "(environment-variables-names + (current-environment-variables))") + '(("'()\n" "" "")) + "empty environment-variables") (check-equal? (eval-code/chez "(+ 1 2)") '(("3\n" "" "")))