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