summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Bex <peter@more-magic.net>2012-11-03 19:14:27 +0100
committerPeter Bex <peter@more-magic.net>2012-11-03 19:14:27 +0100
commite6f78c50b27444c8c8faf88962af60134a32e2f0 (patch)
tree044e843ea1ce071d2832043d85297272257ecfe4 /tests
parent1fd316b5679e60bffb822cc9ff8bf893d976eea5 (diff)
downloadscsh-process-e6f78c50b27444c8c8faf88962af60134a32e2f0.tar.gz
Support new process-fork form which can kill all other threads. We still see some problems occurring
Diffstat (limited to 'tests')
-rw-r--r--tests/run.scm17
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"