make raco test' more like racket'

Instad of `(dynamic-require .. #f)', use `(dynamic-require .. 0)', which
has the effect of making compile-time code "available" (see docs) in
case the loaded module uses `eval' on syntax objects that refer to
non-kernel syntax.

original commit: 0aaf6b8086
This commit is contained in:
Matthew Flatt 2013-02-06 18:07:20 +01:00
parent 55edebebbd
commit cde0a28779

View File

@ -36,7 +36,7 @@
`(file ,(path->string p)) `(file ,(path->string p))
(path->string p)) (path->string p))
,submodule))) ,submodule)))
(dynamic-require mod #f)] (dynamic-require mod 0)]
[else [else
(set! something-wasnt-declared? #t)])) (set! something-wasnt-declared? #t)]))
(when (and run-anyways? something-wasnt-declared?) (when (and run-anyways? something-wasnt-declared?)
@ -44,7 +44,7 @@
(printf "running ~s:\n" (if (absolute-path? p) (printf "running ~s:\n" (if (absolute-path? p)
`(file ,(path->string p)) `(file ,(path->string p))
(path->string p)))) (path->string p))))
(dynamic-require p #f)))] (dynamic-require p 0)))]
[(not (file-exists? p)) [(not (file-exists? p))
(error 'test "given path ~e does not exist" p)])])) (error 'test "given path ~e does not exist" p)])]))