blob: 27c28302258a1f0e59ae13578f9c36197c08814f (
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
|
name: heredoc-1
description:
Check ordering/content of redundent here documents.
stdin:
cat << EOF1 << EOF2
hi
EOF1
there
EOF2
expected-stdout:
there
---
name: heredoc-2
description:
Check quoted here-doc is protected.
stdin:
a=foo
cat << 'EOF'
hi\
there$a
stuff
EOF
expected-stdout:
hi\
there$a
stuff
---
name: heredoc-3
description:
Check quoted here-documents don't have \newline processing done
on them.
stdin:
cat << 'EOF'
hi\
there
EO\
F
EOF
true
expected-stdout:
hi\
there
EO\
F
---
name: heredoc-4
description:
Check that newline isn't needed after heredoc-delimiter marker.
stdin: !
cat << EOF
hi
there
EOF
expected-stdout:
hi
there
---
name: heredoc-5
description:
Check that an error occurs if the heredoc-delimiter is missing.
stdin: !
cat << EOF
hi
there
expected-exit: e > 0
expected-stderr-pattern: /.*/
---
|