aboutsummaryrefslogtreecommitdiffstats
path: root/tests/heredoc.tests
blob: aa6949655bbf22f329d9d384a73ae759aaee6a11 (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
# check order and content of multiple here docs

cat << EOF1 << EOF2 
hi
EOF1
there
EOF2

# check quoted here-doc is protected

a=foo
cat << 'EOF'
hi\
there$a
stuff
EOF

# check that quoted here-documents don't have \newline processing done

cat << 'EOF'
hi\
there
EO\
F
EOF
true

# check that \newline is removed at start of here-doc
cat << EO\
F
hi
EOF

# check that \newline removal works for here-doc delimiter
cat << EOF
hi
EO\
F

# check that end of file delimits a here-document
# THIS MUST BE LAST!

cat << EOF
hi
there