summaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenys Vlasenko2018-04-04 21:14:28 +0200
committerDenys Vlasenko2018-04-04 21:14:28 +0200
commit61407807ab6b9505041a74ad96ffb4aeab937d36 (patch)
treeeda659ec46e2d275d91ac9784dbd2095fb96da57 /shell/hush_test
parent759ca8a4cb57f797e92e02db84673057ce447125 (diff)
downloadbusybox-61407807ab6b9505041a74ad96ffb4aeab937d36.zip
busybox-61407807ab6b9505041a74ad96ffb4aeab937d36.tar.gz
hush: fix for readonly vars in "ro=A ro=B cmd" case
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
-rw-r--r--shell/hush_test/hush-vars/readonly3.right4
-rwxr-xr-xshell/hush_test/hush-vars/readonly3.tests4
2 files changed, 8 insertions, 0 deletions
diff --git a/shell/hush_test/hush-vars/readonly3.right b/shell/hush_test/hush-vars/readonly3.right
new file mode 100644
index 0000000..acd9312
--- /dev/null
+++ b/shell/hush_test/hush-vars/readonly3.right
@@ -0,0 +1,4 @@
+hush: v=2: readonly variable
+hush: v=3: readonly variable
+1
+Ok:1
diff --git a/shell/hush_test/hush-vars/readonly3.tests b/shell/hush_test/hush-vars/readonly3.tests
new file mode 100755
index 0000000..17780cf
--- /dev/null
+++ b/shell/hush_test/hush-vars/readonly3.tests
@@ -0,0 +1,4 @@
+readonly v=1
+# there was a bug causing second assignment to be not checked
+v=2 v=3 echo $v
+echo Ok:$v