From 4d6a0700a6f38f8ca26fa47cfa2e68015bfbd9cc Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Mon, 1 Oct 2012 20:38:00 +0100 Subject: Implement appending to files --- tests/run.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests') 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")) -- cgit v1.2.3