diff options
author | Peter Bex <peter@more-magic.net> | 2012-10-06 19:12:21 +0200 |
---|---|---|
committer | Peter Bex <peter@more-magic.net> | 2012-10-06 19:12:21 +0200 |
commit | ca747cf3bd3fbbdd4f9c2b13d8bdc5e69daf8a24 (patch) | |
tree | 844d8ec115eb9fb622cb0c916190933d49e46f4a /tests | |
parent | 2c55a49100192f590fbd4b54312e55f79e27c667 (diff) | |
download | scsh-process-0.3.tar.gz |
Provide a new 'wait' procedure so we don't need to modify the type of process-wait, which could lead to trouble in user code when compiled with scrutiny and/or specialization. This procedure returns the values in a different order for ease of use. May be a bit confusing...0.3
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) |