summaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-16 10:59:40 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-16 10:59:40 +0000
commitbb929517a86092481ed8547e9f247c1b58bc4745 (patch)
tree61113710afec0eb112df4b6854c5ec6d2f9662a3 /shell/hush_test
parent74a931ac9ea807d14a44baf3fdb957bc58db14c6 (diff)
downloadbusybox-w32-bb929517a86092481ed8547e9f247c1b58bc4745.tar.gz
busybox-w32-bb929517a86092481ed8547e9f247c1b58bc4745.tar.bz2
busybox-w32-bb929517a86092481ed8547e9f247c1b58bc4745.zip
hush: fix "if { echo foo; } then { echo bar; } fi" parsing
function old new delta done_word 728 793 +65 parse_stream 2084 2098 +14
Diffstat (limited to 'shell/hush_test')
-rw-r--r--shell/hush_test/hush-parsing/groups_and_keywords1.right11
-rwxr-xr-xshell/hush_test/hush-parsing/groups_and_keywords1.tests10
-rwxr-xr-xshell/hush_test/hush-vars/param_glob.tests2
3 files changed, 22 insertions, 1 deletions
diff --git a/shell/hush_test/hush-parsing/groups_and_keywords1.right b/shell/hush_test/hush-parsing/groups_and_keywords1.right
new file mode 100644
index 000000000..4c46650dc
--- /dev/null
+++ b/shell/hush_test/hush-parsing/groups_and_keywords1.right
@@ -0,0 +1,11 @@
1Semicolons after } can be omitted 1:
2foo
3bar
4Semicolons after } can be omitted 2:
5foo
6bar
7Semicolons after fi can be omitted:
8foo
9bar
10baz
11Done:0
diff --git a/shell/hush_test/hush-parsing/groups_and_keywords1.tests b/shell/hush_test/hush-parsing/groups_and_keywords1.tests
new file mode 100755
index 000000000..01944d714
--- /dev/null
+++ b/shell/hush_test/hush-parsing/groups_and_keywords1.tests
@@ -0,0 +1,10 @@
1echo "Semicolons after } can be omitted 1:"
2if { echo foo; } then { echo bar; } fi
3
4echo "Semicolons after } can be omitted 2:"
5while { echo foo; } do { echo bar; break; } done
6
7echo "Semicolons after fi can be omitted:"
8while if echo foo; then echo bar; fi do echo baz; break; done
9
10echo Done:$?
diff --git a/shell/hush_test/hush-vars/param_glob.tests b/shell/hush_test/hush-vars/param_glob.tests
index 801d58ee7..0173fd771 100755
--- a/shell/hush_test/hush-vars/param_glob.tests
+++ b/shell/hush_test/hush-vars/param_glob.tests
@@ -1,5 +1,5 @@
1if test $# = 0; then 1if test $# = 0; then
2 #BUG in builtin_exec! will glob param! 2 # UNFIXED BUG in builtin_exec! will glob param!
3 #exec "$THIS_SH" "$0" 'param_glob.t*' 3 #exec "$THIS_SH" "$0" 'param_glob.t*'
4 "$THIS_SH" "$0" 'param_glob.t*' 4 "$THIS_SH" "$0" 'param_glob.t*'
5 exit 5 exit