]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - tools/regression/bin/sh/expansion/heredoc1.0
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / tools / regression / bin / sh / expansion / heredoc1.0
1 # $FreeBSD$
2
3 f() { return $1; }
4
5 [ `f 42; { cat; } <<EOF
6 $?
7 EOF
8 ` = 42 ] || echo compound command bad
9
10 [ `f 42; (cat) <<EOF
11 $?
12 EOF
13 ` = 42 ] || echo subshell bad
14
15 long=`printf %08192d 0`
16
17 [ `f 42; { cat; } <<EOF
18 $long.$?
19 EOF
20 ` = $long.42 ] || echo long compound command bad
21
22 [ `f 42; (cat) <<EOF
23 $long.$?
24 EOF
25 ` = $long.42 ] || echo long subshell bad