aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-04-04 21:14:28 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2018-04-04 21:14:28 +0200
commit61407807ab6b9505041a74ad96ffb4aeab937d36 (patch)
treeeda659ec46e2d275d91ac9784dbd2095fb96da57 /shell/hush_test
parent759ca8a4cb57f797e92e02db84673057ce447125 (diff)
downloadbusybox-w32-61407807ab6b9505041a74ad96ffb4aeab937d36.tar.gz
busybox-w32-61407807ab6b9505041a74ad96ffb4aeab937d36.tar.bz2
busybox-w32-61407807ab6b9505041a74ad96ffb4aeab937d36.zip
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 000000000..acd931243
--- /dev/null
+++ b/shell/hush_test/hush-vars/readonly3.right
@@ -0,0 +1,4 @@
1hush: v=2: readonly variable
2hush: v=3: readonly variable
31
4Ok:1
diff --git a/shell/hush_test/hush-vars/readonly3.tests b/shell/hush_test/hush-vars/readonly3.tests
new file mode 100755
index 000000000..17780cfda
--- /dev/null
+++ b/shell/hush_test/hush-vars/readonly3.tests
@@ -0,0 +1,4 @@
1readonly v=1
2# there was a bug causing second assignment to be not checked
3v=2 v=3 echo $v
4echo Ok:$v