summaryrefslogtreecommitdiff
path: root/release/src/router/busybox/shell/hush_test/hush-vars/var_preserved.tests
diff options
context:
space:
mode:
Diffstat (limited to 'release/src/router/busybox/shell/hush_test/hush-vars/var_preserved.tests')
-rwxr-xr-xrelease/src/router/busybox/shell/hush_test/hush-vars/var_preserved.tests16
1 files changed, 16 insertions, 0 deletions
diff --git a/release/src/router/busybox/shell/hush_test/hush-vars/var_preserved.tests b/release/src/router/busybox/shell/hush_test/hush-vars/var_preserved.tests
new file mode 100755
index 00000000..1bddd870
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-vars/var_preserved.tests
@@ -0,0 +1,16 @@
+export a=b
+
+# external program
+a=c /bin/true
+env | grep ^a=
+
+# builtin
+a=d true
+env | grep ^a=
+
+# exec with redirection only
+# in bash, this leaks!
+a=e exec 1>&1
+env | grep ^a=
+
+echo OK