testcase for the last fix
authorDenis Vlasenko <vda.linux@googlemail.com>
Mon, 13 Oct 2008 08:54:42 +0000 (08:54 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Mon, 13 Oct 2008 08:54:42 +0000 (08:54 -0000)
shell/hush_test/hush-vars/var_preserved.right [new file with mode: 0644]
shell/hush_test/hush-vars/var_preserved.tests [new file with mode: 0755]

diff --git a/shell/hush_test/hush-vars/var_preserved.right b/shell/hush_test/hush-vars/var_preserved.right
new file mode 100644 (file)
index 0000000..b0def4b
--- /dev/null
@@ -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 (executable)
index 0000000..132d387
--- /dev/null
@@ -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