diff options
Diffstat (limited to 'shell/hush_test')
-rw-r--r-- | shell/hush_test/hush-misc/export1.right | 1 | ||||
-rwxr-xr-x | shell/hush_test/hush-misc/export1.tests | 2 | ||||
-rw-r--r-- | shell/hush_test/hush-vars/param_expand_default.right | 3 | ||||
-rwxr-xr-x | shell/hush_test/hush-vars/param_expand_default.tests | 7 |
4 files changed, 10 insertions, 3 deletions
diff --git a/shell/hush_test/hush-misc/export1.right b/shell/hush_test/hush-misc/export1.right new file mode 100644 index 000000000..56647af8e --- /dev/null +++ b/shell/hush_test/hush-misc/export1.right | |||
@@ -0,0 +1 @@ | |||
|\w \\ \ \| | |||
diff --git a/shell/hush_test/hush-misc/export1.tests b/shell/hush_test/hush-misc/export1.tests new file mode 100755 index 000000000..4ffb40bdc --- /dev/null +++ b/shell/hush_test/hush-misc/export1.tests | |||
@@ -0,0 +1,2 @@ | |||
1 | export Z='\w \\ \ \' | ||
2 | echo "|$Z|" | ||
diff --git a/shell/hush_test/hush-vars/param_expand_default.right b/shell/hush_test/hush-vars/param_expand_default.right index acc717205..8bd0814b0 100644 --- a/shell/hush_test/hush-vars/param_expand_default.right +++ b/shell/hush_test/hush-vars/param_expand_default.right | |||
@@ -1,8 +1,9 @@ | |||
1 | hush: syntax error: unterminated ${name} | 1 | hush: syntax error: unterminated ${name} |
2 | hush: syntax error: unterminated ${name} | ||
3 | _0 _0 | 2 | _0 _0 |
4 | _ _ _ _word _word | 3 | _ _ _ _word _word |
5 | _aaaa _aaaa _aaaa _aaaa _aaaa | 4 | _aaaa _aaaa _aaaa _aaaa _aaaa |
6 | _ _ _ _word _word | 5 | _ _ _ _word _word |
7 | _ _ _ _ _word | 6 | _ _ _ _ _word |
8 | _fff _fff _fff _fff _fff | 7 | _fff _fff _fff _fff _fff |
8 | 1:1 | ||
9 | 0:0 | ||
diff --git a/shell/hush_test/hush-vars/param_expand_default.tests b/shell/hush_test/hush-vars/param_expand_default.tests index 16e5f8efe..dbd3e2218 100755 --- a/shell/hush_test/hush-vars/param_expand_default.tests +++ b/shell/hush_test/hush-vars/param_expand_default.tests | |||
@@ -1,7 +1,5 @@ | |||
1 | # first try some invalid patterns (do in subshell due to parsing error) | 1 | # first try some invalid patterns (do in subshell due to parsing error) |
2 | # (set argv0 to "SHELL" to avoid "/path/to/shell: blah" in error messages) | 2 | # (set argv0 to "SHELL" to avoid "/path/to/shell: blah" in error messages) |
3 | # valid in bash and ash (same as $-), not supported in hush (yet?): | ||
4 | "$THIS_SH" -c 'echo ${-}' SHELL | ||
5 | "$THIS_SH" -c 'echo ${:-}' SHELL | 3 | "$THIS_SH" -c 'echo ${:-}' SHELL |
6 | 4 | ||
7 | # now some funky ones | 5 | # now some funky ones |
@@ -22,3 +20,8 @@ echo _$f _${f-} _${f:-} _${f-word} _${f:-word} | |||
22 | 20 | ||
23 | f=fff | 21 | f=fff |
24 | echo _$f _${f-} _${f:-} _${f-word} _${f:-word} | 22 | echo _$f _${f-} _${f:-} _${f-word} _${f:-word} |
23 | |||
24 | set -- | ||
25 | set -- "${1-}"; echo 1:$# | ||
26 | set -- | ||
27 | set -- ${1-}; echo 0:$# | ||