1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-19 15:14:48 +00:00

jpm test now starts a new interpreter per test.

This should help with setup/teardown semantics, especially
with native modules.
This commit is contained in:
Calvin Rose 2019-09-16 00:47:54 -05:00
parent 16127fc55c
commit f2ba91899f

View File

@ -783,7 +783,9 @@ int main(int argc, const char **argv) {
(case (os/stat ndir :mode)
:file (when (string/has-suffix? ".janet" ndir)
(print "running " ndir " ...")
(dofile ndir :exit true))
(def result (os/execute [(dyn :executable "janet") ndir] :p))
(when (not= 0 result)
(os/exit result)))
:directory (dodir ndir))))
(dodir "test")
(print "All tests passed.")))