aboutsummaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-misc/env_and_func.tests
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash_test/ash-misc/env_and_func.tests')
-rwxr-xr-xshell/ash_test/ash-misc/env_and_func.tests8
1 files changed, 8 insertions, 0 deletions
diff --git a/shell/ash_test/ash-misc/env_and_func.tests b/shell/ash_test/ash-misc/env_and_func.tests
new file mode 100755
index 000000000..3efef1a41
--- /dev/null
+++ b/shell/ash_test/ash-misc/env_and_func.tests
@@ -0,0 +1,8 @@
+var=old
+f() { echo "var=$var"; }
+# bash: POSIXLY_CORRECT behavior is to "leak" new variable values
+# out of function invocations (similar to "special builtins" behavior);
+# but in "bash mode", they don't leak.
+# hush does not "leak" values. ash does.
+var=val f
+echo "var=$var"