summary refs log tree commit diff
path: root/bin/1sh/tests/expansion/heredoc1.0
blob: 364e909c03b8300939e731f9353353c059b3c180 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# $FreeBSD: releng/12.1/bin/sh/tests/expansion/heredoc1.0 222715 2011-06-05 12:46:26Z jilles $

f() { return $1; }

[ `f 42; { cat; } <<EOF
$?
EOF
` = 42 ] || echo compound command bad

[ `f 42; (cat) <<EOF
$?
EOF
` = 42 ] || echo subshell bad

long=`printf %08192d 0`

[ `f 42; { cat; } <<EOF
$long.$?
EOF
` = $long.42 ] || echo long compound command bad

[ `f 42; (cat) <<EOF
$long.$?
EOF
` = $long.42 ] || echo long subshell bad