hush: fix break'ing out of {} and () groups; with testcase

function                                             old     new   delta
builtin_break                                         93     129     +36
builtin_continue                                      21      47     +26
run_list                                            1973    1976      +3
This commit is contained in:
Denis Vlasenko
2008-07-29 11:37:15 +00:00
parent d91afa33fd
commit fcf37c3183
3 changed files with 43 additions and 13 deletions

View File

@@ -0,0 +1,13 @@
A
B
0
A:a
B
D
A:b
B
D
A:c
B
D
0

View File

@@ -0,0 +1,4 @@
while true; do echo A; { echo B; break; echo C; }; echo D; done
echo $?
for v in a b c; do echo A:$v; (echo B; break; echo C); echo D; done
echo $?