Skip to content

Commit

Permalink
eval-bot: empty environment variables when eval code
Browse files Browse the repository at this point in the history
  • Loading branch information
yfzhe committed Aug 6, 2024
1 parent 08f628e commit 921321c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions eval-bot/eval.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down Expand Up @@ -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" "" "")))
Expand Down

0 comments on commit 921321c

Please sign in to comment.