hush: fix '{ false; echo $?; }' bug.
hush: expand testsuite. variable expansion is still very broken
This commit is contained in:
1
shell/hush_test/hush-bugs/argv0.right
Normal file
1
shell/hush_test/hush-bugs/argv0.right
Normal file
@@ -0,0 +1 @@
|
||||
OK
|
4
shell/hush_test/hush-bugs/argv0.tests
Executable file
4
shell/hush_test/hush-bugs/argv0.tests
Executable file
@@ -0,0 +1,4 @@
|
||||
if test $# = 0; then
|
||||
exec "$THIS_SH" "$0" arg
|
||||
fi
|
||||
echo OK
|
1
shell/hush_test/hush-bugs/quote1.right
Normal file
1
shell/hush_test/hush-bugs/quote1.right
Normal file
@@ -0,0 +1 @@
|
||||
'1'
|
2
shell/hush_test/hush-bugs/quote1.tests
Executable file
2
shell/hush_test/hush-bugs/quote1.tests
Executable file
@@ -0,0 +1,2 @@
|
||||
a=1
|
||||
echo "'$a'"
|
1
shell/hush_test/hush-bugs/quote2.right
Normal file
1
shell/hush_test/hush-bugs/quote2.right
Normal file
@@ -0,0 +1 @@
|
||||
>1
|
2
shell/hush_test/hush-bugs/quote2.tests
Executable file
2
shell/hush_test/hush-bugs/quote2.tests
Executable file
@@ -0,0 +1,2 @@
|
||||
a=1
|
||||
echo ">$a"
|
1
shell/hush_test/hush-bugs/starquoted.right
Normal file
1
shell/hush_test/hush-bugs/starquoted.right
Normal file
@@ -0,0 +1 @@
|
||||
.1 abc d e f.
|
4
shell/hush_test/hush-bugs/starquoted.tests
Executable file
4
shell/hush_test/hush-bugs/starquoted.tests
Executable file
@@ -0,0 +1,4 @@
|
||||
if test $# = 0; then
|
||||
exec "$THIS_SH" starquoted.tests 1 abc 'd e f'
|
||||
fi
|
||||
for a in "$*"; do echo ".$a."; done
|
5
shell/hush_test/hush-vars/star.right
Normal file
5
shell/hush_test/hush-vars/star.right
Normal file
@@ -0,0 +1,5 @@
|
||||
.1.
|
||||
.abc.
|
||||
.d.
|
||||
.e.
|
||||
.f.
|
8
shell/hush_test/hush-vars/star.tests
Executable file
8
shell/hush_test/hush-vars/star.tests
Executable file
@@ -0,0 +1,8 @@
|
||||
if test $# = 0; then
|
||||
exec "$THIS_SH" star.tests 1 abc 'd e f'
|
||||
fi
|
||||
# 'd e f' should be split into 3 separate args:
|
||||
for a in $*; do echo ".$a."; done
|
||||
|
||||
# must produce .1 abc d e f. Currently does not
|
||||
#for a in "$*"; do echo ".$a."; done
|
@@ -1,4 +1,4 @@
|
||||
http://busybox.net
|
||||
http://busybox.net_abc
|
||||
1
|
||||
0
|
||||
1
|
||||
|
@@ -6,5 +6,4 @@ echo ${URL}_abc
|
||||
true
|
||||
false; echo $?
|
||||
true
|
||||
# BUG: prints 0, must be 1
|
||||
{ false; echo $?; }
|
||||
|
Reference in New Issue
Block a user