diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/run.scm | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/run.scm b/tests/run.scm index ae12600..13313e5 100644 --- a/tests/run.scm +++ b/tests/run.scm @@ -1,7 +1,7 @@ #;(include "../scsh-process.scm") (use scsh-process) -(use test posix srfi-13) +(use test posix srfi-13 srfi-18 (only setup-api chicken-version version>=?)) (test-begin "scsh-process") @@ -59,6 +59,21 @@ (delete-file* tmpfile))) (test-group "Subprocesses" + (test "run/string with begin form" + "hi, there\n" + (run/string (pipe (begin (print "hi, there")) (cat)))) + (when (version>=? (chicken-version) "4.8.1") + (let ((child? #f)) + (thread-start! (lambda () + (thread-sleep! 0.5) + (when child? (print "haihai")))) + (test "Simple 'begin' form with threading" + "hi, there\n" + (run/string (pipe (begin (set! child? #t) + (thread-sleep! 1) + (print "hi, there")) + (cat)))))) + (let ((outfile "outfile")) (test "Subprocess writing to a file" "hi, there\n" |