ahell: update testsuite
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
53d45c934f
commit
05c5d745f7
2
shell/ash_test/ash-vars/var6.right
Normal file
2
shell/ash_test/ash-vars/var6.right
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
SHELL: line 1: syntax error: bad substitution
|
||||||
|
SHELL: line 1: syntax error: bad substitution
|
5
shell/ash_test/ash-vars/var6.tests
Executable file
5
shell/ash_test/ash-vars/var6.tests
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
# reject invalid vars
|
||||||
|
# (set argv0 to "SHELL" to avoid "/path/to/shell: blah" in error messages)
|
||||||
|
"$THIS_SH" -c 'echo ${1q}' SHELL
|
||||||
|
"$THIS_SH" -c 'echo ${&}' SHELL
|
||||||
|
#"$THIS_SH" -c 'echo ${$}' SHELL -- this is valid as it's the same as $$
|
3
shell/ash_test/ash-vars/var_nested1.right
Normal file
3
shell/ash_test/ash-vars/var_nested1.right
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Expected:AB Actual:AB
|
||||||
|
Expected:Ab Actual:Ab
|
||||||
|
Expected:ab Actual:ab
|
16
shell/ash_test/ash-vars/var_nested1.tests
Executable file
16
shell/ash_test/ash-vars/var_nested1.tests
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
f() { a=A; b=B; }
|
||||||
|
|
||||||
|
a=a
|
||||||
|
b=b
|
||||||
|
f
|
||||||
|
echo Expected:AB Actual:$a$b
|
||||||
|
|
||||||
|
a=a
|
||||||
|
b=b
|
||||||
|
b= f
|
||||||
|
echo Expected:Ab Actual:$a$b
|
||||||
|
|
||||||
|
a=a
|
||||||
|
b=b
|
||||||
|
a= b= f
|
||||||
|
echo Expected:ab Actual:$a$b
|
1
shell/ash_test/ash-vars/var_nested2.right
Normal file
1
shell/ash_test/ash-vars/var_nested2.right
Normal file
@ -0,0 +1 @@
|
|||||||
|
aB
|
2
shell/ash_test/ash-vars/var_nested2.tests
Executable file
2
shell/ash_test/ash-vars/var_nested2.tests
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
# the bug was easier to trigger in one-liner form
|
||||||
|
a=a; b=b; f() { a=A; b=B; }; a= f; echo $a$b
|
@ -1,4 +1,5 @@
|
|||||||
# reject invalid vars
|
# reject invalid vars
|
||||||
"$THIS_SH" -c 'echo ${1q}'
|
# (set argv0 to "SHELL" to avoid "/path/to/shell: blah" in error messages)
|
||||||
"$THIS_SH" -c 'echo ${&}'
|
"$THIS_SH" -c 'echo ${1q}' SHELL
|
||||||
#"$THIS_SH" -c 'echo ${$}' -- this is valid as it's the same as $$
|
"$THIS_SH" -c 'echo ${&}' SHELL
|
||||||
|
#"$THIS_SH" -c 'echo ${$}' SHELL -- this is valid as it's the same as $$
|
||||||
|
Loading…
Reference in New Issue
Block a user