From 9678636911b39a7adf9b51d5b625cf4dc7e4ac81 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 11 Apr 2018 16:02:58 +0200 Subject: hush: IFS fixes $ IFS=": "; x=" "; set x $x; for v; do echo "|$v|"; done |x| $ IFS=": "; x=":"; set x $x; for v; do echo "|$v|"; done |x| || function old new delta run_pipe 1789 1870 +81 expand_on_ifs 310 361 +51 pseudo_exec_argv 588 591 +3 builtin_local 50 53 +3 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/0 up/down: 138/0) Total: 138 bytes Signed-off-by: Denys Vlasenko --- shell/hush_test/hush-vars/var_wordsplit_ifs4.right | 5 +++++ shell/hush_test/hush-vars/var_wordsplit_ifs4.tests | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 shell/hush_test/hush-vars/var_wordsplit_ifs4.right create mode 100755 shell/hush_test/hush-vars/var_wordsplit_ifs4.tests (limited to 'shell/hush_test') diff --git a/shell/hush_test/hush-vars/var_wordsplit_ifs4.right b/shell/hush_test/hush-vars/var_wordsplit_ifs4.right new file mode 100644 index 000000000..c27284c31 --- /dev/null +++ b/shell/hush_test/hush-vars/var_wordsplit_ifs4.right @@ -0,0 +1,5 @@ +|x| +Ok1:0 +|x| +|| +Ok2:0 diff --git a/shell/hush_test/hush-vars/var_wordsplit_ifs4.tests b/shell/hush_test/hush-vars/var_wordsplit_ifs4.tests new file mode 100755 index 000000000..638bfbb28 --- /dev/null +++ b/shell/hush_test/hush-vars/var_wordsplit_ifs4.tests @@ -0,0 +1,4 @@ +IFS=": "; x=" "; set x $x; for v; do echo "|$v|"; done +echo Ok1:$? +IFS=": "; x=":"; set x $x; for v; do echo "|$v|"; done +echo Ok2:$? -- cgit v1.2.3