xref: /freebsd/bin/sh/tests/builtins/local1.0 (revision cfd6422a5217410fbd66f7a7a8a64d9d85e61229)
1# $FreeBSD$
2# A commonly used but non-POSIX builtin.
3
4f() {
5	local x
6	x=2
7	[ "$x" = 2 ]
8}
9x=1
10f || exit 3
11[ "$x" = 1 ] || exit 3
12f || exit 3
13[ "$x" = 1 ] || exit 3
14