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:
13
shell/hush_test/hush-misc/break5.right
Normal file
13
shell/hush_test/hush-misc/break5.right
Normal file
@@ -0,0 +1,13 @@
|
||||
A
|
||||
B
|
||||
0
|
||||
A:a
|
||||
B
|
||||
D
|
||||
A:b
|
||||
B
|
||||
D
|
||||
A:c
|
||||
B
|
||||
D
|
||||
0
|
4
shell/hush_test/hush-misc/break5.tests
Executable file
4
shell/hush_test/hush-misc/break5.tests
Executable 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 $?
|
Reference in New Issue
Block a user