diff options
Diffstat (limited to 'shell/hush_test')
4 files changed, 33 insertions, 0 deletions
diff --git a/shell/hush_test/hush-vars/var_wordsplit_ifs2.right b/shell/hush_test/hush-vars/var_wordsplit_ifs2.right new file mode 100644 index 000000000..c234193fe --- /dev/null +++ b/shell/hush_test/hush-vars/var_wordsplit_ifs2.right | |||
@@ -0,0 +1,3 @@ | |||
1 | Unquoted:<1> | ||
2 | Unquoted:<3> | ||
3 | Quoted:<123> | ||
diff --git a/shell/hush_test/hush-vars/var_wordsplit_ifs2.tests b/shell/hush_test/hush-vars/var_wordsplit_ifs2.tests new file mode 100755 index 000000000..47523549c --- /dev/null +++ b/shell/hush_test/hush-vars/var_wordsplit_ifs2.tests | |||
@@ -0,0 +1,13 @@ | |||
1 | # 123 chars long | ||
2 | a="\ | ||
3 | 01234567890123456789\ | ||
4 | 01234567890123456789\ | ||
5 | 01234567890123456789\ | ||
6 | 01234567890123456789\ | ||
7 | 01234567890123456789\ | ||
8 | 0123456789\ | ||
9 | 0123456789\ | ||
10 | 012" | ||
11 | |||
12 | IFS=2; for v in ${#a}; do echo Unquoted:"<$v>"; done | ||
13 | IFS=2; for v in "${#a}"; do echo Quoted:"<$v>"; done | ||
diff --git a/shell/hush_test/hush-vars/var_wordsplit_ifs3.right b/shell/hush_test/hush-vars/var_wordsplit_ifs3.right new file mode 100644 index 000000000..5ab72e1cd --- /dev/null +++ b/shell/hush_test/hush-vars/var_wordsplit_ifs3.right | |||
@@ -0,0 +1,12 @@ | |||
1 | Unquoted%:<q> | ||
2 | Unquoted%:<w> | ||
3 | Unquoted%:<e> | ||
4 | Unquoted%:<r> | ||
5 | Unquoted%:<t> | ||
6 | Unquoted#:<w> | ||
7 | Unquoted#:<e> | ||
8 | Unquoted#:<r> | ||
9 | Unquoted#:<t> | ||
10 | Unquoted#:<y> | ||
11 | Quoted%:<q w e r t > | ||
12 | Quoted#:< w e r t y> | ||
diff --git a/shell/hush_test/hush-vars/var_wordsplit_ifs3.tests b/shell/hush_test/hush-vars/var_wordsplit_ifs3.tests new file mode 100755 index 000000000..4aa65574a --- /dev/null +++ b/shell/hush_test/hush-vars/var_wordsplit_ifs3.tests | |||
@@ -0,0 +1,5 @@ | |||
1 | a="q w e r t y" | ||
2 | for v in ${a%y}; do echo Unquoted%:"<$v>"; done | ||
3 | for v in ${a#q}; do echo Unquoted#:"<$v>"; done | ||
4 | for v in "${a%y}"; do echo Quoted%:"<$v>"; done | ||
5 | for v in "${a#q}"; do echo Quoted#:"<$v>"; done | ||