freebsd-nq/bin/sh/tests/builtins/local1.0

14 lines
164 B
Plaintext
Raw Normal View History

# $FreeBSD$
# 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