From b7e6e25195ecef9c37c21173acc9cf2c355dd6e8 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Mon, 1 Oct 2012 20:11:11 +0100 Subject: Fix run/port* so it doesn't replace the input port when in the REPL. Unfortunately, no test for it --- tests/run.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tests') 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 -- cgit v1.2.3