From e6f78c50b27444c8c8faf88962af60134a32e2f0 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Sat, 3 Nov 2012 19:14:27 +0100 Subject: Support new process-fork form which can kill all other threads. We still see some problems occurring --- tests/run.scm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'tests') 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" -- cgit v1.2.3