summaryrefslogtreecommitdiff
path: root/tests/run.scm
diff options
context:
space:
mode:
authorPeter Bex <peter@more-magic.net>2012-10-01 20:11:11 +0100
committerPeter Bex <peter@more-magic.net>2012-10-01 20:11:11 +0100
commitb7e6e25195ecef9c37c21173acc9cf2c355dd6e8 (patch)
treeab0d9e0a29c5431d4c62a74d337a1db185f1124a /tests/run.scm
parent64a6f0f19f488ef87071ef15fa6ddd67c78ae272 (diff)
downloadscsh-process-b7e6e25195ecef9c37c21173acc9cf2c355dd6e8.tar.gz
Fix run/port* so it doesn't replace the input port when in the REPL. Unfortunately, no test for it
Diffstat (limited to 'tests/run.scm')
-rw-r--r--tests/run.scm11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/run.scm b/tests/run.scm
index f537ad8..4e3bb8a 100644
--- a/tests/run.scm
+++ b/tests/run.scm
@@ -35,9 +35,10 @@
'(a b c)
(read (run/port (echo "(a b c)"))))
- (test "Simple run/file"
- "blah\n"
- (with-input-from-file (run/file (echo "blah")) read-all)))
+ (let ((tmpfile (run/file (echo "blah"))))
+ (test "Simple run/file"
+ "blah\n"
+ (with-input-from-file tmpfile read-all))))
(test-group "Subprocesses"
(let ((outfile "outfile"))
@@ -96,4 +97,8 @@
#f
(|| (false) (epf (sh -c "echo hi && false") (- 1))))))
+;; TODO: Find a way to test that the input port didn't get replaced by
+;; one from a subshell. This happened before, but not sure how
+;; to detect this except running it manually from the REPL.
+
(test-exit) \ No newline at end of file