i-bash/tests/heredoc.tests

46 lines
528 B
Text
Raw Normal View History

1996-12-23 17:02:34 +00:00
# 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