mirror of
https://github.com/janet-lang/janet
synced 2025-06-19 06:54:13 +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:
parent
16127fc55c
commit
f2ba91899f
@ -783,7 +783,9 @@ int main(int argc, const char **argv) {
|
|||||||
(case (os/stat ndir :mode)
|
(case (os/stat ndir :mode)
|
||||||
:file (when (string/has-suffix? ".janet" ndir)
|
:file (when (string/has-suffix? ".janet" ndir)
|
||||||
(print "running " 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))))
|
:directory (dodir ndir))))
|
||||||
(dodir "test")
|
(dodir "test")
|
||||||
(print "All tests passed.")))
|
(print "All tests passed.")))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user