summaryrefslogtreecommitdiffhomepage
path: root/tests/posix/heredoc-eof.sh
blob: 72fb77148e1209f60d50da446a8980ec2f1a3c97 (plain)
1
2
3
4
5
6
# A here-document cut off by end of input has an empty body: the delimiter
# word must not be used as the body.
"$TSH" -c 'cat <<EOT'; echo "[rc=$?]"
"$TSH" -c 'cat <<"EOT"'; echo "[rc=$?]"
printf 'cat <<EOF\nline1' | "$TSH"
printf 'cat <<EOF\nline2\n' | "$TSH"