aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2019-05-27 11:56:52 +0100
committerRon Yorston <rmy@pobox.com>2019-05-27 11:56:52 +0100
commita61949401890cbb33a9d6c4571b51c53460ad438 (patch)
tree64dedaddb89896d5b1670a421af123670ca2120b /shell/hush_test
parent03a7b173605a890e1db5177ecd5b8dd591081c41 (diff)
parentbcb1fc3e6ca6fe902610f507eaf9b0b58a5c583a (diff)
downloadbusybox-w32-a61949401890cbb33a9d6c4571b51c53460ad438.tar.gz
busybox-w32-a61949401890cbb33a9d6c4571b51c53460ad438.tar.bz2
busybox-w32-a61949401890cbb33a9d6c4571b51c53460ad438.zip
Merge branch 'busybox' into merge
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:$#