summaryrefslogtreecommitdiff
path: root/tests/run.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run.scm')
-rw-r--r--tests/run.scm11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/run.scm b/tests/run.scm
index b72ca75..c37a241 100644
--- a/tests/run.scm
+++ b/tests/run.scm
@@ -3,6 +3,8 @@
(use test posix)
+(test-begin "scsh-process")
+
(test-group "Procedural interface"
(test "Fork/pipe \"hello world\" example from SCSH reference manual"
"Hello, world."
@@ -13,7 +15,10 @@
(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")))))
+ (run/string* (lambda () (display "This is a test"))))
+
+ (test-error "run*/string* raises error if subprocess has nonzero exit status"
+ (run*/string* (lambda () (display "ohai") (exit 1)))))
(test-group "Macro (EPF) interface"
(delete-file* "outfile") ; Leftovers from last run
@@ -25,7 +30,7 @@
(test "Simple run/sexp"
'("hi, there")
- (run/sexp (echo "(\"hi, there\")")))
+ (run/sexp (echo "(\"hi, there\") trailing stuff is ignored")))
(test "Simple run/sexps"
'(("hi, there") (a b c))
@@ -118,4 +123,6 @@
;; one from a subshell. This happened before, but not sure how
;; to detect this except running it manually from the REPL.
+(test-end)
+
(test-exit) \ No newline at end of file