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