xref: /dflybsd-src/tools/regression/bin/sh/expansion/heredoc1.0 (revision 3e3895bf4584c1562faf4533cbd97026ee6a8dcf)
1*3e3895bfSKrzysztof Piecuch# $FreeBSD: head/bin/sh/tests/expansion/heredoc1.0 222715 2011-06-05 12:46:26Z jilles $
27975815bSPeter Avalos
37975815bSPeter Avalosf() { return $1; }
47975815bSPeter Avalos
57975815bSPeter Avalos[ `f 42; { cat; } <<EOF
67975815bSPeter Avalos$?
77975815bSPeter AvalosEOF
87975815bSPeter Avalos` = 42 ] || echo compound command bad
97975815bSPeter Avalos
107975815bSPeter Avalos[ `f 42; (cat) <<EOF
117975815bSPeter Avalos$?
127975815bSPeter AvalosEOF
137975815bSPeter Avalos` = 42 ] || echo subshell bad
147975815bSPeter Avalos
157975815bSPeter Avaloslong=`printf %08192d 0`
167975815bSPeter Avalos
177975815bSPeter Avalos[ `f 42; { cat; } <<EOF
187975815bSPeter Avalos$long.$?
197975815bSPeter AvalosEOF
207975815bSPeter Avalos` = $long.42 ] || echo long compound command bad
217975815bSPeter Avalos
227975815bSPeter Avalos[ `f 42; (cat) <<EOF
237975815bSPeter Avalos$long.$?
247975815bSPeter AvalosEOF
257975815bSPeter Avalos` = $long.42 ] || echo long subshell bad
26