From: Denis Vlasenko Date: Mon, 13 Oct 2008 08:54:42 +0000 (-0000) Subject: testcase for the last fix X-Git-Tag: 1_13_0~122 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d29084dd7d23cb0efe0732b22aa669adcc5eaa0e;p=oweals%2Fbusybox.git testcase for the last fix --- diff --git a/shell/hush_test/hush-vars/var_preserved.right b/shell/hush_test/hush-vars/var_preserved.right new file mode 100644 index 000000000..b0def4bb6 --- /dev/null +++ b/shell/hush_test/hush-vars/var_preserved.right @@ -0,0 +1,4 @@ +a=a +a=a +a=a +OK diff --git a/shell/hush_test/hush-vars/var_preserved.tests b/shell/hush_test/hush-vars/var_preserved.tests new file mode 100755 index 000000000..132d387b4 --- /dev/null +++ b/shell/hush_test/hush-vars/var_preserved.tests @@ -0,0 +1,16 @@ +export a=a + +# external program +a=b /bin/true +env | grep ^a= + +# builtin +a=b true +env | grep ^a= + +# exec with redirection only +# in bash, this leaks! +a=b exec 1>&1 +env | grep ^a= + +echo OK