diff options
author | Jörg Wittenberger <Joerg.Wittenberger@janztec.com> | 2017-11-03 13:44:37 +0100 |
---|---|---|
committer | Peter Bex <peter@more-magic.net> | 2017-11-08 20:30:33 +0100 |
commit | 18fee2590806ac57f5c09476ea5589d7552b40ab (patch) | |
tree | 240d5c1071c7a72d0d7949aa51ebfa4aa64102a8 /tests/run.scm | |
parent | 736da4689151366a707669bff7569c3123ed608b (diff) | |
download | scsh-process-18fee2590806ac57f5c09476ea5589d7552b40ab.tar.gz |
Add a test case for "annonymous" wait.
Signed-off-by: Peter Bex <peter@more-magic.net>
Diffstat (limited to 'tests/run.scm')
-rw-r--r-- | tests/run.scm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/run.scm b/tests/run.scm index 7b61f44..8e202ac 100644 --- a/tests/run.scm +++ b/tests/run.scm @@ -17,6 +17,12 @@ (test "run/string* returns a string output in a subprocess" "This is a test" (run/string* (lambda () (display "This is a test")))) + (test "wait for next process to exit" + '(#t #t #t) + (let ((p (& (sleep 1)))) + (receive (status ok? pid) (wait #f) + (receive (status2 ok?2 pid2) (wait p) + (list (eq? status status2) (eq? ok? ok?2) (or (eq? pid pid2) (list pid pid2))))))) ;; Reported by Haochi Kiang (test "run/string* does not redirect stderr" |