xref: /freebsd/bin/sh/tests/expansion/heredoc1.0 (revision edf8578117e8844e02c0121147f45e4609b30680)
1
2f() { return $1; }
3
4[ `f 42; { cat; } <<EOF
5$?
6EOF
7` = 42 ] || echo compound command bad
8
9[ `f 42; (cat) <<EOF
10$?
11EOF
12` = 42 ] || echo subshell bad
13
14long=`printf %08192d 0`
15
16[ `f 42; { cat; } <<EOF
17$long.$?
18EOF
19` = $long.42 ] || echo long compound command bad
20
21[ `f 42; (cat) <<EOF
22$long.$?
23EOF
24` = $long.42 ] || echo long subshell bad
25