aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-vars
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-04-11 16:02:58 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2018-04-11 16:02:58 +0200
commit9678636911b39a7adf9b51d5b625cf4dc7e4ac81 (patch)
tree75a0790a958a82015b34fc033d6f22f6f6dd3cb2 /shell/hush_test/hush-vars
parent34179956f96370f5a53e73073d984d62135cd037 (diff)
downloadbusybox-9678636911b39a7adf9b51d5b625cf4dc7e4ac81.tar.gz
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 <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-vars')
-rw-r--r--shell/hush_test/hush-vars/var_wordsplit_ifs4.right5
-rwxr-xr-xshell/hush_test/hush-vars/var_wordsplit_ifs4.tests4
2 files changed, 9 insertions, 0 deletions
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:$?