From d358b0b65dae83d52e511a126757e2aa7b1881b2 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 5 Apr 2018 00:51:55 +0200 Subject: hush: fix a bug where we don't properly handle f() { a=A; b=B; }; a= f function old new delta unset_local_var 20 274 +254 leave_var_nest_level - 98 +98 set_vars_and_save_old 128 164 +36 enter_var_nest_level - 32 +32 builtin_local 46 50 +4 pseudo_exec_argv 554 544 -10 redirect_and_varexp_helper 77 64 -13 run_pipe 1890 1641 -249 unset_local_var_len 267 - -267 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 3/3 up/down: 424/-539) Total: -115 bytes Signed-off-by: Denys Vlasenko --- shell/hush_test/hush-vars/var_nested1.right | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 shell/hush_test/hush-vars/var_nested1.right (limited to 'shell/hush_test/hush-vars/var_nested1.right') diff --git a/shell/hush_test/hush-vars/var_nested1.right b/shell/hush_test/hush-vars/var_nested1.right new file mode 100644 index 000000000..f4bc5f4b6 --- /dev/null +++ b/shell/hush_test/hush-vars/var_nested1.right @@ -0,0 +1,3 @@ +Expected:AB Actual:AB +Expected:Ab Actual:Ab +Expected:ab Actual:ab -- cgit v1.2.3