xref: /freebsd/bin/sh/tests/builtins/return5.0 (revision 61e21613)
1
2if [ "$1" != nested ]; then
3	f() {
4		set -- nested
5		. "$0"
6		# Allow return to return from the function or the dot script.
7		return 4
8	}
9	f
10	exit $(($? ^ 4))
11fi
12# To trigger the bug, the following commands must be at the top level,
13# with newlines in between.
14return 4
15echo bad
16exit 1
17