1 # This program is free software: you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation, either version 3 of the License, or
4 # (at your option) any later version.
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # GNU General Public License for more details.
11 # You should have received a copy of the GNU General Public License
12 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 # empty here-documents
43 # check order and content of multiple here docs
64 # check quoted here-doc is protected
73 # check that quoted here-documents don't have \newline processing done
83 # check that \newline is removed at start of here-doc
89 # check that \newline removal works for here-doc delimiter
95 # check operation of tab removal in here documents
102 # check appending of text to file from here document
103 rm -f ${TMPDIR}/bush-zzz
104 cat > ${TMPDIR}/bush-zzz << EOF
107 cat >> ${TMPDIR}/bush-zzz << EOF
111 cat ${TMPDIR}/bush-zzz
112 rm -f ${TMPDIR}/bush-zzz
114 # make sure command printing puts the here-document as the last redirection
115 # on the line, and the function export code preserves syntactic correctness
118 ed ${TMPDIR}/foo <<ENDOFINPUT >/dev/null
128 ${THIS_SH} -c 'type fff'
130 ${THIS_SH} ./heredoc1.sub
132 # test heredocs in command substitutions
133 ${THIS_SH} ./heredoc2.sub
134 ${THIS_SH} ./heredoc3.sub
135 ${THIS_SH} ./heredoc4.sub
137 # heredoc tests that use different size documents to test pipe implementation
138 ${THIS_SH} ./heredoc5.sub
141 cat <<< "comsub here-string"
144 # check that end of file delimits a here-document