hush: fix "if { echo foo; } then { echo bar; } fi" parsing
function old new delta done_word 728 793 +65 parse_stream 2084 2098 +14
This commit is contained in:
11
shell/hush_test/hush-parsing/groups_and_keywords1.right
Normal file
11
shell/hush_test/hush-parsing/groups_and_keywords1.right
Normal file
@@ -0,0 +1,11 @@
|
||||
Semicolons after } can be omitted 1:
|
||||
foo
|
||||
bar
|
||||
Semicolons after } can be omitted 2:
|
||||
foo
|
||||
bar
|
||||
Semicolons after fi can be omitted:
|
||||
foo
|
||||
bar
|
||||
baz
|
||||
Done:0
|
||||
10
shell/hush_test/hush-parsing/groups_and_keywords1.tests
Executable file
10
shell/hush_test/hush-parsing/groups_and_keywords1.tests
Executable file
@@ -0,0 +1,10 @@
|
||||
echo "Semicolons after } can be omitted 1:"
|
||||
if { echo foo; } then { echo bar; } fi
|
||||
|
||||
echo "Semicolons after } can be omitted 2:"
|
||||
while { echo foo; } do { echo bar; break; } done
|
||||
|
||||
echo "Semicolons after fi can be omitted:"
|
||||
while if echo foo; then echo bar; fi do echo baz; break; done
|
||||
|
||||
echo Done:$?
|
||||
@@ -1,5 +1,5 @@
|
||||
if test $# = 0; then
|
||||
#BUG in builtin_exec! will glob param!
|
||||
# UNFIXED BUG in builtin_exec! will glob param!
|
||||
#exec "$THIS_SH" "$0" 'param_glob.t*'
|
||||
"$THIS_SH" "$0" 'param_glob.t*'
|
||||
exit
|
||||
|
||||
Reference in New Issue
Block a user