summary refs log tree commit diff
path: root/bin/cash/tests/expansion/heredoc1.0
blob: cb623e517cca5e076863d67576546fe07a715d17 (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.0/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