aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush_test')
-rw-r--r--shell/hush_test/hush-misc/export1.right1
-rwxr-xr-xshell/hush_test/hush-misc/export1.tests2
-rw-r--r--shell/hush_test/hush-vars/param_expand_default.right3
-rwxr-xr-xshell/hush_test/hush-vars/param_expand_default.tests7
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 @@
1export Z='\w \\ \ \'
2echo "|$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 @@
1hush: syntax error: unterminated ${name} 1hush: syntax error: unterminated ${name}
2hush: 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
81:1
90: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
23f=fff 21f=fff
24echo _$f _${f-} _${f:-} _${f-word} _${f:-word} 22echo _$f _${f-} _${f:-} _${f-word} _${f:-word}
23
24set --
25set -- "${1-}"; echo 1:$#
26set --
27set -- ${1-}; echo 0:$#