i-bash/tests/heredoc.tests
2009-09-12 16:46:49 +00:00

45 lines
528 B
Text

# 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