From 11db27b4994ddcc1073ceb2b69b73601e29ed164 Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Mon, 1 Oct 2012 17:20:20 +0100 Subject: Fix nested pipe expressions and run/sexps, adding tests for both --- test/run.scm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'test/run.scm') diff --git a/test/run.scm b/test/run.scm index 1256845..d190c95 100644 --- a/test/run.scm +++ b/test/run.scm @@ -33,6 +33,20 @@ (test "Simple run/string" "hi, there\n" - (run/string (echo "hi, there")))) + (run/string (echo "hi, there"))) + + (test "Simple run/sexp" + '("hi, there") + (run/sexp (echo "(\"hi, there\")"))) + + (test "Simple run/sexps" + '(("hi, there") (a b c)) + (run/sexps (echo "(\"hi, there\") (a b c)"))) + + (test "Nested output redirection with pipe+" + "foo\n" + (run/string (pipe+ ((1 0)) + (pipe+ ((2 0)) (sh -c "echo foo >&2") (cat)) + (cat))))) (test-exit) \ No newline at end of file -- cgit v1.2.3