aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/test
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-01-27 02:32:55 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-01-31 15:54:33 +0300
commit749f748ae6ded6e229214d2dddf3c45482bffbd3 (patch)
treec504c8b225db01c8c152b3772467d16c036a42fc /unit-tests/test
parente61a287832532124a1a90a8bb9cc0f61f3a4db92 (diff)
Add support for test command pipe, expression and command-if
Diffstat (limited to 'unit-tests/test')
-rw-r--r--unit-tests/test/script/parser/pipe-expr.test44
1 files changed, 44 insertions, 0 deletions
diff --git a/unit-tests/test/script/parser/pipe-expr.test b/unit-tests/test/script/parser/pipe-expr.test
index cc0bd7e..d789f56 100644
--- a/unit-tests/test/script/parser/pipe-expr.test
+++ b/unit-tests/test/script/parser/pipe-expr.test
@@ -87,3 +87,47 @@ cmd &&
EOI
testscript:1:7: error: missing program
EOE
+
+: redirected
+:
+{
+ : input
+ :
+ {
+ : first
+ :
+ $* <<EOI >>EOO
+ cmd1 <foo | cmd2
+ EOI
+ cmd1 <foo | cmd2
+ EOO
+
+ : non-first
+ :
+ $* <<EOI 2>>EOE != 0
+ cmd1 | cmd2 <foo
+ EOI
+ testscript:1:13: error: stdin is both piped and redirected
+ EOE
+ }
+
+ : output
+ :
+ {
+ : last
+ :
+ $* <<EOI >>EOO
+ cmd1 | cmd2 >foo
+ EOI
+ cmd1 | cmd2 >foo
+ EOO
+
+ : non-last
+ :
+ $* <<EOI 2>>EOE != 0
+ cmd1 >foo | cmd2
+ EOI
+ testscript:1:11: error: stdout is both redirected and piped
+ EOE
+ }
+}