X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=tests%2Fheredoc.tests;h=c07ef642392abbf7b39d0d940bcf4acdcaeb2c14;hb=d166f048818e10cf3799aa24a174fb22835f1acc;hp=aa6949655bbf22f329d9d384a73ae759aaee6a11;hpb=ccc6cda312fea9f0468ee65b8f368e9653e1380b;p=platform%2Fupstream%2Fbash.git diff --git a/tests/heredoc.tests b/tests/heredoc.tests index aa69496..c07ef64 100644 --- a/tests/heredoc.tests +++ b/tests/heredoc.tests @@ -6,6 +6,20 @@ EOF1 there EOF2 +while read line1; do + read line2 <&3 + echo $line1 - $line2 +done < /tmp/bash-zzz << EOF +abc +EOF +cat >> /tmp/bash-zzz << EOF +def ghi +jkl mno +EOF +cat /tmp/bash-zzz +rm -f /tmp/bash-zzz + +# make sure command printing puts the here-document as the last redirection +# on the line, and the function export code preserves syntactic correctness +fff() +{ + ed /tmp/foo </dev/null +/^name/d +w +q +ENDOFINPUT +aa=1 +} + +type fff +export -f fff +${THIS_SH} -c 'type fff' + # check that end of file delimits a here-document # THIS MUST BE LAST!