summaryrefslogtreecommitdiffstats
path: root/shell_cmds/sh/tests/builtins/local1.0
blob: 6100274abc6cafb534e1bb37e5dca38bad9de4ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# $FreeBSD: head/bin/sh/tests/builtins/local1.0 238469 2012-07-15 10:22:13Z jilles $
# A commonly used but non-POSIX builtin.

f() {
	local x
	x=2
	[ "$x" = 2 ]
}
x=1
f || exit 3
[ "$x" = 1 ] || exit 3
f || exit 3
[ "$x" = 1 ] || exit 3