diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/run.scm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/run.scm b/tests/run.scm index 56a823e..ae12600 100644 --- a/tests/run.scm +++ b/tests/run.scm @@ -7,13 +7,13 @@ (test-group "Procedural interface" (test "Fork/pipe \"hello world\" example from SCSH reference manual" - "Hello, world." - (begin (process-wait - (fork/pipe + '(0 #t "Hello, world.") + (receive (exit-status exited-ok? pid) + (wait (fork/pipe (lambda () (with-output-to-port (open-output-file* 1) (lambda () (display "Hello, world.\n")))))) - (read-line (open-input-file* 0)))) + (list exit-status exited-ok? (read-line (open-input-file* 0))))) (test "run/string* returns a string output in a subprocess" "This is a test" (run/string* (lambda () (display "This is a test")))) @@ -127,8 +127,7 @@ ;; TODO: Find a way to test that the input port didn't get replaced by ;; one from a subshell. This happened before, but not sure how ;; to detect this except running it manually from the REPL. - (test-error "No more zombies lying around after we're done" - (process-wait))) + (test-error "No more zombies lying around after we're done" (wait))) (test-end) |