1 # $FreeBSD: head/bin/sh/tests/execution/redir7.0 220978 2011-04-23 22:28:56Z jilles $
6 if [ "$2" != "$3" ]; then
7 echo "Failure at $1" >&2
8 failures=$((failures + 1))
12 check $LINENO "$(trap "echo bye" EXIT; f() { :; }; f >/dev/null)" bye
13 check $LINENO "$(trap "echo bye" EXIT; f() { :; }; { f; } >/dev/null)" bye
14 check $LINENO "$(trap "echo bye" EXIT; f() { :; }; (f) >/dev/null)" bye
15 check $LINENO "$(trap "echo bye" EXIT; f() { :; }; (f >/dev/null))" bye
16 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; f() { :; }; f >/dev/null')" bye
17 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; f() { :; }; { f; } >/dev/null')" bye
18 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; f() { :; }; (f) >/dev/null')" bye
19 check $LINENO "$(${SH} -c 'trap "echo bye" EXIT; f() { :; }; (f >/dev/null)')" bye
21 exit $((failures > 0))