diff options
Diffstat (limited to '')
-rw-r--r-- | bin/1sh/tests/builtins/local4.0 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/1sh/tests/builtins/local4.0 b/bin/1sh/tests/builtins/local4.0 new file mode 100644 index 00000000..3d5ec0d4 --- /dev/null +++ b/bin/1sh/tests/builtins/local4.0 @@ -0,0 +1,12 @@ +# $FreeBSD: releng/12.1/bin/sh/tests/builtins/local4.0 254339 2013-08-14 21:59:48Z jilles $ + +f() { + local -- x + x=2 + [ "$x" = 2 ] +} +x=1 +f || exit 3 +[ "$x" = 1 ] || exit 3 +f || exit 3 +[ "$x" = 1 ] || exit 3 |