aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-vars
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush_test/hush-vars')
-rw-r--r--shell/hush_test/hush-vars/var_leaks.right1
-rwxr-xr-xshell/hush_test/hush-vars/var_leaks.tests14
2 files changed, 15 insertions, 0 deletions
diff --git a/shell/hush_test/hush-vars/var_leaks.right b/shell/hush_test/hush-vars/var_leaks.right
new file mode 100644
index 000000000..d86bac9de
--- /dev/null
+++ b/shell/hush_test/hush-vars/var_leaks.right
@@ -0,0 +1 @@
+OK
diff --git a/shell/hush_test/hush-vars/var_leaks.tests b/shell/hush_test/hush-vars/var_leaks.tests
new file mode 100755
index 000000000..27c8c6504
--- /dev/null
+++ b/shell/hush_test/hush-vars/var_leaks.tests
@@ -0,0 +1,14 @@
+# 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