From 4a4e5ad3c50619ad7653b01b562af9794c97aa80 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 1 Nov 2016 16:35:47 +0200 Subject: Implement command-pipe, command-expr in testscript parser --- unit-tests/test/script/parser/pipe-expr.test | 47 ++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 unit-tests/test/script/parser/pipe-expr.test (limited to 'unit-tests/test/script/parser/pipe-expr.test') diff --git a/unit-tests/test/script/parser/pipe-expr.test b/unit-tests/test/script/parser/pipe-expr.test new file mode 100644 index 0000000..5a6e6ab --- /dev/null +++ b/unit-tests/test/script/parser/pipe-expr.test @@ -0,0 +1,47 @@ +: pipe +: +$* <>EOO +cmd1 | cmd2|cmd3 +EOI +cmd1 | cmd2 | cmd3 +EOO + +: log +: +$* <>EOO +cmd1 || cmd2&&cmd3 +EOI +cmd1 || cmd2 && cmd3 +EOO + +: pipe-log +: +$* <>EOO +cmd1 | cmd2 && cmd3 | cmd4 +EOI +cmd1 | cmd2 && cmd3 | cmd4 +EOO + +: exit +: +$* <>EOO +cmd1|cmd2==1&&cmd3!=0|cmd4 +EOI +cmd1 | cmd2 == 1 && cmd3 != 0 | cmd4 +EOO + +: leading +: +$* <>EOE != 0 +| cmd +EOI +testscript:1:1: error: missing program +EOE + +: trailing +: +$* <>EOE != 0 +cmd && +EOI +testscript:1:7: error: missing program +EOE -- cgit v1.1