aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-05-18 14:35:20 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-05-18 14:35:20 +0200
commit51b4a9e2f192c03039f339401026752f6340df25 (patch)
tree82eca7c223ca74293038c7b5d2a6843a12a81b60 /shell
parent5e2d572381dd0c354a4463382fe1297c709a8464 (diff)
downloadbusybox-w32-51b4a9e2f192c03039f339401026752f6340df25.tar.gz
busybox-w32-51b4a9e2f192c03039f339401026752f6340df25.tar.bz2
busybox-w32-51b4a9e2f192c03039f339401026752f6340df25.zip
ash: fix var_leak testcase
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/ash_test/ash-vars/var_leak.right3
-rwxr-xr-xshell/ash_test/ash-vars/var_leak.tests19
2 files changed, 16 insertions, 6 deletions
diff --git a/shell/ash_test/ash-vars/var_leak.right b/shell/ash_test/ash-vars/var_leak.right
index 45c5458dd..be78112c8 100644
--- a/shell/ash_test/ash-vars/var_leak.right
+++ b/shell/ash_test/ash-vars/var_leak.right
@@ -1,2 +1,3 @@
1should be empty: '' 1should be empty: ''
2should be empty: '' 2should be not empty: 'val2'
3should be not empty: 'val3'
diff --git a/shell/ash_test/ash-vars/var_leak.tests b/shell/ash_test/ash-vars/var_leak.tests
index 1b1123fb7..032059295 100755
--- a/shell/ash_test/ash-vars/var_leak.tests
+++ b/shell/ash_test/ash-vars/var_leak.tests
@@ -1,9 +1,18 @@
1# This currently fails with CONFIG_FEATURE_SH_NOFORK=y 1# true is a regular builtin, varibale should not leak out of it
2# this currently fails with CONFIG_FEATURE_SH_NOFORK=y
2VAR='' 3VAR=''
3VAR=qwe true 4VAR=val1 true
4echo "should be empty: '$VAR'" 5echo "should be empty: '$VAR'"
5 6
6# This fails (always) 7# ash follows the "special builtin leaks variables" rule here:
8# exec is a special builtin. (bash does not do it)
7VAR='' 9VAR=''
8VAR=qwe exec 2>&1 10VAR=val2 exec 2>&1
9echo "should be empty: '$VAR'" 11echo "should be not empty: '$VAR'"
12
13# ash follows the "function call is a special builtin" rule here
14# (bash does not do it)
15f() { true; }
16VAR=''
17VAR=val3 f
18echo "should be not empty: '$VAR'"