summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Bex <peter@more-magic.net>2012-10-05 21:16:35 +0200
committerPeter Bex <peter@more-magic.net>2012-10-05 21:16:35 +0200
commit151d2a88bb15a252453c41a080ddc3fcc7b4de49 (patch)
tree1527103bbc59d8ba87bd0e7917597eb0c99cccad /tests
parentf335b90a882da57f7a3c438d959a34d574e46c04 (diff)
downloadscsh-process-151d2a88bb15a252453c41a080ddc3fcc7b4de49.tar.gz
Improve test for <<-redirection by making it less dependent on random factors that determine process interleaving, ensuring it gets processed through the pipeline rather than on the same descriptor by mangling it through 'tr'. Fix <<-redirection by reopening output port on new descriptor and explicitly setting up the input port to the given fd in the parent process
Diffstat (limited to 'tests')
-rw-r--r--tests/run.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/run.scm b/tests/run.scm
index 2ad287f..c4deb88 100644
--- a/tests/run.scm
+++ b/tests/run.scm
@@ -1,7 +1,7 @@
(include "../scsh-process.scm")
(import scsh-process)
-(use test posix)
+(use test posix srfi-13)
(test-begin "scsh-process")
@@ -53,8 +53,9 @@
(let ((message "testing, 1 2 3"))
(test "Redirecting from object"
- `("blah" "foo" ,message)
- (run/strings (cat ,tmpfile -) (<< ,message))))
+ `("blah" "foo" ,(string-delete #\t message))
+ (run/strings (pipe (epf (tr -d t) (<< ,message))
+ (cat ,tmpfile -)))))
(delete-file* tmpfile)))
(test-group "Subprocesses"