summary refs log tree commit diff
path: root/bin/cash/tests/builtins/local1.0
blob: a1fb2c380af1bc787a0318fbd69d1aeaa2992ff4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# $FreeBSD: releng/12.0/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