From 397cf7b9b95da396bc18758dd025822cf2fa76f8 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 2 Nov 2016 11:17:44 +0200 Subject: Add test for here-doc in pipe/expr command --- unit-tests/test/script/parser/pipe-expr.test | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'unit-tests') 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 +: +$* <>EOO +cmd1 <>EOO2 && cmd3 <&1 | cmd4 2>>EOE4 >>EOO4 +input +one +EOI1 +ouput +two +EOO2 +input +three +EOI3 +error +four +EOE4 +output +four +EOO4 +EOI +cmd1 <>EOO2 && cmd3 <&1 | cmd4 >>EOO4 2>>EOE4 +input +one +EOI1 +ouput +two +EOO2 +input +three +EOI3 +output +four +EOO4 +error +four +EOE4 +EOO + : leading : $* <>EOE != 0 -- cgit v1.1