]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/heredoc.right
Bash-4.4 patch 19
[thirdparty/bash.git] / tests / heredoc.right
CommitLineData
ccc6cda3 1there
d166f048
JA
2one - alpha
3two - beta
4three - gamma
ccc6cda3
JA
5hi\
6there$a
7stuff
8hi\
9there
10EO\
11F
12hi
13hi
d166f048
JA
14tab 1
15tab 2
16tab 3
17abc
18def ghi
19jkl mno
20fff is a function
21fff ()
22{
0628567a 23 ed /tmp/foo > /dev/null <<ENDOFINPUT
d166f048
JA
24/^name/d
25w
26q
27ENDOFINPUT
28
29 aa=1
30}
31fff is a function
32fff ()
33{
0628567a 34 ed /tmp/foo > /dev/null <<ENDOFINPUT
d166f048
JA
35/^name/d
36w
37q
38ENDOFINPUT
39
40 aa=1
41}
17345e5a
JA
42foo is a function
43foo ()
44{
45 echo;
46 cat <<END
47bar
48END
49
50 cat <<EOF
51qux
52EOF
53
54}
55
56bar
57qux
58
59bar
60qux
ac50fbac 61abc def geh
a0c0a00f 62./heredoc3.sub: line 9: warning: here-document at line 7 delimited by end-of-file (wanted `EOF')
ac50fbac 63= here is the text =
a0c0a00f 64./heredoc3.sub: line 15: warning: here-document at line 13 delimited by end-of-file (wanted `EOF')
ac50fbac 65this paren ) is not a problem
a0c0a00f 66./heredoc3.sub: line 21: warning: here-document at line 19 delimited by end-of-file (wanted `EOF')
ac50fbac 67these balanced parens ( ) are not a problem
a0c0a00f 68./heredoc3.sub: line 27: warning: here-document at line 25 delimited by end-of-file (wanted `EOF')
ac50fbac
CR
69quoted balanced parens \( ) are not a problem either
70more text in a subshell
71some more text in a different subshell
72end
73hello
74hello
75ENDEND
76end ENDEND
77hello
78end hello
ac50fbac
CR
79end x*x
80helloEND
81end helloEND
82hello
83\END
84end hello<NL>\END
a0c0a00f
CR
85./heredoc3.sub: line 78: warning: here-document at line 76 delimited by end-of-file (wanted `EOF')
86./heredoc3.sub: line 79: syntax error: unexpected end of file
0001803f 87comsub here-string
ac50fbac 88./heredoc.tests: line 105: warning: here-document at line 103 delimited by end-of-file (wanted `EOF')
ccc6cda3
JA
89hi
90there