aboutsummaryrefslogtreecommitdiff
path: root/unit-tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-11-02 11:17:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:37 +0200
commit397cf7b9b95da396bc18758dd025822cf2fa76f8 (patch)
treed2de1677ba484727b3d29609c4b92b1a45184125 /unit-tests
parentba76c548dd3936366486c330c9ee1aa44fd93de0 (diff)
Add test for here-doc in pipe/expr command
Diffstat (limited to 'unit-tests')
-rw-r--r--unit-tests/test/script/parser/pipe-expr.test38
1 files changed, 38 insertions, 0 deletions
diff --git a/unit-tests/test/script/parser/pipe-expr.test b/unit-tests/test/script/parser/pipe-expr.test
index 5a6e6ab..74077e7 100644
--- a/unit-tests/test/script/parser/pipe-expr.test
+++ b/unit-tests/test/script/parser/pipe-expr.test
@@ -30,6 +30,44 @@ EOI
cmd1 | cmd2 == 1 && cmd3 != 0 | cmd4
EOO
+: here-doc
+:
+$* <<EOI >>EOO
+cmd1 <<EOI1 | cmd2 >>EOO2 && cmd3 <<EOI3 2>&1 | cmd4 2>>EOE4 >>EOO4
+input
+one
+EOI1
+ouput
+two
+EOO2
+input
+three
+EOI3
+error
+four
+EOE4
+output
+four
+EOO4
+EOI
+cmd1 <<EOI1 | cmd2 >>EOO2 && cmd3 <<EOI3 2>&1 | cmd4 >>EOO4 2>>EOE4
+input
+one
+EOI1
+ouput
+two
+EOO2
+input
+three
+EOI3
+output
+four
+EOO4
+error
+four
+EOE4
+EOO
+
: leading
:
$* <<EOI 2>>EOE != 0