summaryrefslogtreecommitdiffstats
path: root/bin/sh/tests
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2016-01-22 18:10:36 +0000
committerjilles <jilles@FreeBSD.org>2016-01-22 18:10:36 +0000
commit9d436f6b51685e86cc24b58102da57cdd239d0c4 (patch)
treef6f77211792b3aa7dbeb6a2ab8998ebc9a2a18e8 /bin/sh/tests
parent1f41c60b30412295a83be196cf3133e0a6b95e4c (diff)
downloadFreeBSD-src-9d436f6b51685e86cc24b58102da57cdd239d0c4.zip
FreeBSD-src-9d436f6b51685e86cc24b58102da57cdd239d0c4.tar.gz
sh: Add already working test for local-readonly interaction.
Diffstat (limited to 'bin/sh/tests')
-rw-r--r--bin/sh/tests/builtins/Makefile1
-rw-r--r--bin/sh/tests/builtins/local6.010
2 files changed, 11 insertions, 0 deletions
diff --git a/bin/sh/tests/builtins/Makefile b/bin/sh/tests/builtins/Makefile
index 1511f70..4d94d94 100644
--- a/bin/sh/tests/builtins/Makefile
+++ b/bin/sh/tests/builtins/Makefile
@@ -112,6 +112,7 @@ FILES+= local2.0
FILES+= local3.0
FILES+= local4.0
FILES+= local5.0
+FILES+= local6.0
.if ${MK_NLS} != "no"
FILES+= locale1.0
.endif
diff --git a/bin/sh/tests/builtins/local6.0 b/bin/sh/tests/builtins/local6.0
new file mode 100644
index 0000000..017bb12
--- /dev/null
+++ b/bin/sh/tests/builtins/local6.0
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+f() {
+ local x
+ readonly x=2
+}
+x=3
+f
+x=4
+[ "$x" = 4 ]
OpenPOWER on IntegriCloud