blob: 6abaa1f42d88e6f2abdd14d738bd9ad8500a4527 [file] [log] [blame]
Jari Aaltoccc6cda1996-12-23 17:02:34 +00001there
Jari Aaltod166f041997-06-05 14:59:13 +00002one - alpha
3two - beta
4three - gamma
Jari Aaltoccc6cda1996-12-23 17:02:34 +00005hi\
6there$a
7stuff
8hi\
9there
10EO\
11F
12hi
13hi
Jari Aaltod166f041997-06-05 14:59:13 +000014tab 1
15tab 2
16tab 3
17abc
18def ghi
19jkl mno
20fff is a function
21fff ()
22{
Jari Aalto06285672006-10-10 14:15:34 +000023 ed /tmp/foo > /dev/null <<ENDOFINPUT
Jari Aaltod166f041997-06-05 14:59:13 +000024/^name/d
25w
26q
27ENDOFINPUT
28
29 aa=1
30}
31fff is a function
32fff ()
33{
Jari Aalto06285672006-10-10 14:15:34 +000034 ed /tmp/foo > /dev/null <<ENDOFINPUT
Jari Aaltod166f041997-06-05 14:59:13 +000035/^name/d
36w
37q
38ENDOFINPUT
39
40 aa=1
41}
Jari Aalto17345e52009-02-19 22:21:29 +000042foo 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
Chet Rameyac50fba2014-02-26 09:36:43 -050061abc def geh
62./heredoc3.sub: line 6: warning: here-document at line 4 delimited by end-of-file (wanted `EOF')
63= here is the text =
64./heredoc3.sub: line 12: warning: here-document at line 10 delimited by end-of-file (wanted `EOF')
65this paren ) is not a problem
66./heredoc3.sub: line 18: warning: here-document at line 16 delimited by end-of-file (wanted `EOF')
67these balanced parens ( ) are not a problem
68./heredoc3.sub: line 24: warning: here-document at line 22 delimited by end-of-file (wanted `EOF')
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
79x star x
80end x*x
81helloEND
82end helloEND
83hello
84\END
85end hello<NL>\END
86./heredoc3.sub: line 74: warning: here-document at line 72 delimited by end-of-file (wanted `EOF')
87./heredoc3.sub: line 75: syntax error: unexpected end of file
Chet Ramey00018032011-11-21 20:51:19 -050088comsub here-string
Chet Rameyac50fba2014-02-26 09:36:43 -050089./heredoc.tests: line 105: warning: here-document at line 103 delimited by end-of-file (wanted `EOF')
Jari Aaltoccc6cda1996-12-23 17:02:34 +000090hi
91there