Imported from ../bash-2.0.tar.gz.
[platform/upstream/bash.git] / tests / heredoc.tests
1 # check order and content of multiple here docs
2
3 cat << EOF1 << EOF2 
4 hi
5 EOF1
6 there
7 EOF2
8
9 # check quoted here-doc is protected
10
11 a=foo
12 cat << 'EOF'
13 hi\
14 there$a
15 stuff
16 EOF
17
18 # check that quoted here-documents don't have \newline processing done
19
20 cat << 'EOF'
21 hi\
22 there
23 EO\
24 F
25 EOF
26 true
27
28 # check that \newline is removed at start of here-doc
29 cat << EO\
30 F
31 hi
32 EOF
33
34 # check that \newline removal works for here-doc delimiter
35 cat << EOF
36 hi
37 EO\
38 F
39
40 # check that end of file delimits a here-document
41 # THIS MUST BE LAST!
42
43 cat << EOF
44 hi
45 there