blob: 292e8ec124b4baaba8bb6a8f764cce9996bf72b6 (
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
# file : tests/test/script/runner/testscript
# copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
#$* -o foo <<<aaa >>>&bbb 2>>>ccc
$* # status-def
$* == 0 # status-eq-0
$* -s 1 != 0 # status-ne-0
$* -s 1 == 1 # status-eq-1
$* != 1 # status-ne-1
$* -o foo >- # out-null
$* -e foo 2>- # err-null
$* -i 0 <foo # in-str
$* -o foo >foo # out-str
$* -e foo 2>foo # err-str
$* -i 1 <foo >foo # inout-str
$* -i 2 <foo 2>foo # inerr-str
$* -i 1 -e bar <foo 1>foo 2>bar # inout-err-str
$* -i 0 <<EOO # in-doc
foo
bar
EOO
$* -o foo -o bar >>EOO # out-doc
foo
bar
EOO
$* -e foo -e bar 2>>EOO # err-doc
foo
bar
EOO
$* -i 1 <<EOI >>EOO # inout-doc
foo
bar
EOI
foo
bar
EOO
$* -i 2 <<EOI 2>>EOE # inerr-doc
foo
bar
EOI
foo
bar
EOE
$* -i 1 -e bar -e baz -s 2 <<EOI 1>>EOO 2>>EOE == 2 # inout-err-doc-status
foo
bar
EOI
foo
bar
EOO
bar
baz
EOE
$* -i 1 -e "" <<EOI >>EOO 2>"" # empty-str-doc
EOI
EOO
$* -i 1 <<EOI >>EOO # nl-containing-doc
EOI
EOO
# No-newline tests.
#
# @@ TMP Need does not compare test.
#
$* -i 1 <:"foo" >:"foo" # no-newline-str
#\
$* -i 1 <:"foo" >!"foo" # no-newline-str-fail1
$* -i 1 <"foo" >:!"foo" # no-newline-str-fail2
#\
$* -i 1 <<:EOI >>:EOO # no-newline-doc
foo
EOI
foo
EOO
#\
$* -i 1 <<:EOI >>!EOO # no-newline-doc-fail1
foo
EOI
foo
EOO
$* -i 1 <<EOI >>:!EOO # no-newline-doc-fail2
foo
EOI
foo
EOO
#\
$* -i 1 <<:EOI >>:EOO 2>:"" # no-newline-empty-str-doc
EOI
EOO
$* -i 1 <<:EOI >>:EOO # no-newline-nl-cont-doc
EOI
EOO
|