aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-misc
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-05-04 00:14:30 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-05-04 00:14:30 +0200
commitcb6ff25afeb2daeebcb435c9766215061d3c75cb (patch)
treee185f3ff23622f171d52fb783ad4b23626f26bfc /shell/hush_test/hush-misc
parente19e1935a33b117e2ee6daf9b2d79c00603333c7 (diff)
downloadbusybox-cb6ff25afeb2daeebcb435c9766215061d3c75cb.tar.gz
hush: fix bug where in "var=val func" var's value is not visible in func
function old new delta unset_local_var - 168 +168 set_vars_all_and_save_old - 87 +87 get_ptr_to_local_var - 77 +77 free_strings_and_unset - 53 +53 builtin_export 266 274 +8 get_local_var_value 31 33 +2 putenv_all 27 - -27 free_strings_and_unsetenv 53 - -53 get_local_var 68 - -68 run_list 2475 2350 -125 builtin_unset 380 220 -160 ------------------------------------------------------------------------------ (add/remove: 4/3 grow/shrink: 2/2 up/down: 395/-433) Total: -38 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-misc')
-rw-r--r--shell/hush_test/hush-misc/env_and_func.right2
-rwxr-xr-xshell/hush_test/hush-misc/env_and_func.tests4
2 files changed, 6 insertions, 0 deletions
diff --git a/shell/hush_test/hush-misc/env_and_func.right b/shell/hush_test/hush-misc/env_and_func.right
new file mode 100644
index 000000000..4a1545058
--- /dev/null
+++ b/shell/hush_test/hush-misc/env_and_func.right
@@ -0,0 +1,2 @@
+var=val
+var=old
diff --git a/shell/hush_test/hush-misc/env_and_func.tests b/shell/hush_test/hush-misc/env_and_func.tests
new file mode 100755
index 000000000..1d4eaf3a7
--- /dev/null
+++ b/shell/hush_test/hush-misc/env_and_func.tests
@@ -0,0 +1,4 @@
+var=old
+f() { echo "var=$var"; }
+var=val f
+echo "var=$var"