diff options
author | Peter Bex <peter@more-magic.net> | 2012-10-01 20:38:00 +0100 |
---|---|---|
committer | Peter Bex <peter@more-magic.net> | 2012-10-01 20:38:00 +0100 |
commit | 4d6a0700a6f38f8ca26fa47cfa2e68015bfbd9cc (patch) | |
tree | 9862deb7c08a148b6836386fb8851bd8803c90b1 /tests/run.scm | |
parent | b7e6e25195ecef9c37c21173acc9cf2c355dd6e8 (diff) | |
download | scsh-process-4d6a0700a6f38f8ca26fa47cfa2e68015bfbd9cc.tar.gz |
Implement appending to files
Diffstat (limited to 'tests/run.scm')
-rw-r--r-- | tests/run.scm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/run.scm b/tests/run.scm index 4e3bb8a..df73ac3 100644 --- a/tests/run.scm +++ b/tests/run.scm @@ -38,7 +38,17 @@ (let ((tmpfile (run/file (echo "blah")))) (test "Simple run/file" "blah\n" - (with-input-from-file tmpfile read-all)))) + (with-input-from-file tmpfile read-all)) + + (test "Appending to a file" + '("blah" "foo") + (begin (run (echo foo) (>> ,tmpfile)) + (read-lines tmpfile))) + + (test "Redirecting from object" + '("blah" "foo" "testing, 1 2 3") + (run/strings (cat tmpfile -) (<< "testing, 1 2 3"))) + (delete-file* tmpfile))) (test-group "Subprocesses" (let ((outfile "outfile")) |