aboutsummaryrefslogtreecommitdiff
path: root/shell/ash_test
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash_test')
-rw-r--r--shell/ash_test/ash-vars/var_wordsplit_ifs1.right25
-rwxr-xr-xshell/ash_test/ash-vars/var_wordsplit_ifs1.tests21
2 files changed, 46 insertions, 0 deletions
diff --git a/shell/ash_test/ash-vars/var_wordsplit_ifs1.right b/shell/ash_test/ash-vars/var_wordsplit_ifs1.right
new file mode 100644
index 000000000..efdafc70f
--- /dev/null
+++ b/shell/ash_test/ash-vars/var_wordsplit_ifs1.right
@@ -0,0 +1,25 @@
1Testing: !IFS $*
2.abc.
3.d.
4.e.
5Testing: !IFS $@
6.abc.
7.d.
8.e.
9Testing: !IFS "$*"
10.abc d e.
11Testing: !IFS "$@"
12.abc.
13.d e.
14Testing: IFS="" $*
15.abc.
16.d e.
17Testing: IFS="" $@
18.abc.
19.d e.
20Testing: IFS="" "$*"
21.abcd e.
22Testing: IFS="" "$@"
23.abc.
24.d e.
25Finished
diff --git a/shell/ash_test/ash-vars/var_wordsplit_ifs1.tests b/shell/ash_test/ash-vars/var_wordsplit_ifs1.tests
new file mode 100755
index 000000000..532ab992e
--- /dev/null
+++ b/shell/ash_test/ash-vars/var_wordsplit_ifs1.tests
@@ -0,0 +1,21 @@
1set -- abc "d e"
2
3echo 'Testing: !IFS $*'
4unset IFS; for a in $*; do echo ".$a."; done
5echo 'Testing: !IFS $@'
6unset IFS; for a in $@; do echo ".$a."; done
7echo 'Testing: !IFS "$*"'
8unset IFS; for a in "$*"; do echo ".$a."; done
9echo 'Testing: !IFS "$@"'
10unset IFS; for a in "$@"; do echo ".$a."; done
11
12echo 'Testing: IFS="" $*'
13IFS=""; for a in $*; do echo ".$a."; done
14echo 'Testing: IFS="" $@'
15IFS=""; for a in $@; do echo ".$a."; done
16echo 'Testing: IFS="" "$*"'
17IFS=""; for a in "$*"; do echo ".$a."; done
18echo 'Testing: IFS="" "$@"'
19IFS=""; for a in "$@"; do echo ".$a."; done
20
21echo Finished