commit bash-20110401 snapshot

This commit is contained in:
Chet Ramey
2011-12-29 13:06:12 -05:00
parent c1854f2dd6
commit af32e54dd7
19 changed files with 1838 additions and 1271 deletions
+27 -1
View File
@@ -59,7 +59,33 @@ qux
bar
qux
abc def geh
./heredoc3.sub: line 6: warning: here-document at line 4 delimited by end-of-file (wanted `EOF')
= here is the text =
./heredoc3.sub: line 12: warning: here-document at line 10 delimited by end-of-file (wanted `EOF')
this paren ) is not a problem
./heredoc3.sub: line 18: warning: here-document at line 16 delimited by end-of-file (wanted `EOF')
these balanced parens ( ) are not a problem
./heredoc3.sub: line 24: warning: here-document at line 22 delimited by end-of-file (wanted `EOF')
quoted balanced parens \( ) are not a problem either
more text in a subshell
some more text in a different subshell
end
hello
hello
ENDEND
end ENDEND
hello
end hello
x star x
end x*x
helloEND
end helloEND
hello
\END
end hello<NL>\END
./heredoc3.sub: line 74: warning: here-document at line 72 delimited by end-of-file (wanted `EOF')
./heredoc3.sub: line 75: syntax error: unexpected end of file
comsub here-string
./heredoc.tests: line 103: warning: here-document at line 101 delimited by end-of-file (wanted `EOF')
./heredoc.tests: line 105: warning: here-document at line 103 delimited by end-of-file (wanted `EOF')
hi
there
+2
View File
@@ -91,6 +91,8 @@ ${THIS_SH} ./heredoc1.sub
# test heredocs in command substitutions
${THIS_SH} ./heredoc2.sub
${THIS_SH} ./heredoc3.sub
echo $(
cat <<< "comsub here-string"
)
+74
View File
@@ -0,0 +1,74 @@
text=$(cat <<EOF
here is the text
EOF)
echo = $text =
unbalanced=$(cat <<EOF
this paren ) is not a problem
EOF)
echo $unbalanced
balanced=$(cat <<EOF
these balanced parens ( ) are not a problem
EOF)
echo $balanced
balanced=$(cat <<EOF
quoted balanced parens \( ) are not a problem either
EOF)
echo $balanced
(cat <<EOF
more text in a subshell
EOF
)
(cat <<EOF; )
some more text in a different subshell
EOF
echo end
# semi-weird examples posted by Wayne Pollack to austin-group mailing list
cat <<-' END'
hello
END
cat <<END
hello
END\
END
END
echo end ENDEND
cat <<' END '
hello
END
echo end hello
cat <<x*x & touch 'x*x'
x star x
x*x
echo end 'x*x'
rm 'x*x'
cat <<END
hello\
END
END
echo end helloEND
cat <<END
hello
\END
END
echo end 'hello<NL>\END'
# this has to be last -- results in a syntax error
# doesn't currently parse because EOF is not on a line by itself -- should it?
(cat <<EOF
still more text in a subshell
EOF)