summaryrefslogtreecommitdiffhomepage
path: root/shell/ash_test/ash-vars
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-10-28 15:43:50 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2016-10-28 15:43:50 +0200
commitd81e9f5093b222369d510d0b1c0587a411e4c83e (patch)
treea81dea56de47b2578497dd5e31537e6601784d3b /shell/ash_test/ash-vars
parent458c1f218bb6a6bd0325f0b0cedea5ab0980dbc3 (diff)
ash: fix interactive "command eval STRING" exiting on errors.
This bug is also present in current dash Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test/ash-vars')
-rw-r--r--shell/ash_test/ash-vars/readonly1.right2
-rwxr-xr-xshell/ash_test/ash-vars/readonly1.tests7
2 files changed, 9 insertions, 0 deletions
diff --git a/shell/ash_test/ash-vars/readonly1.right b/shell/ash_test/ash-vars/readonly1.right
new file mode 100644
index 000000000..2b363e325
--- /dev/null
+++ b/shell/ash_test/ash-vars/readonly1.right
@@ -0,0 +1,2 @@
+One:1
+One:1
diff --git a/shell/ash_test/ash-vars/readonly1.tests b/shell/ash_test/ash-vars/readonly1.tests
new file mode 100755
index 000000000..81b461f5f
--- /dev/null
+++ b/shell/ash_test/ash-vars/readonly1.tests
@@ -0,0 +1,7 @@
+readonly bla=123
+# Bare "eval bla=123" should abort ("eval" is a special builtin):
+(eval bla=123 2>/dev/null; echo BUG)
+echo One:$?
+# "command BLTIN" disables "special-ness", should not abort:
+command eval bla=123 2>/dev/null
+echo One:$?