aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/test/script/parser/pipe-expr.test
blob: 5a6e6ab03915c47695e0111724fb7985750a863e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
: pipe
:
$* <<EOI >>EOO
cmd1 | cmd2|cmd3
EOI
cmd1 | cmd2 | cmd3
EOO

: log
:
$* <<EOI >>EOO
cmd1 || cmd2&&cmd3
EOI
cmd1 || cmd2 && cmd3
EOO

: pipe-log
:
$* <<EOI >>EOO
cmd1 | cmd2 && cmd3 | cmd4
EOI
cmd1 | cmd2 && cmd3 | cmd4
EOO

: exit
:
$* <<EOI >>EOO
cmd1|cmd2==1&&cmd3!=0|cmd4
EOI
cmd1 | cmd2 == 1 && cmd3 != 0 | cmd4
EOO

: leading
:
$* <<EOI 2>>EOE != 0
| cmd
EOI
testscript:1:1: error: missing program
EOE

: trailing
:
$* <<EOI 2>>EOE != 0
cmd &&
EOI
testscript:1:7: error: missing program
EOE