sh: Add a simple test for the "local" builtin.
This commit is contained in:
parent
84fbdd8ca0
commit
fe36e227e8
13
tools/regression/bin/sh/builtins/local1.0
Normal file
13
tools/regression/bin/sh/builtins/local1.0
Normal file
@ -0,0 +1,13 @@
|
||||
# $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
|
Loading…
Reference in New Issue
Block a user