summaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenis Vlasenko2008-07-29 11:37:15 +0000
committerDenis Vlasenko2008-07-29 11:37:15 +0000
commitfcf37c31838fbdd4f8cfe24c1c8ef957838a6de4 (patch)
tree9834030682794e8d7a3ced1aa2c57870951f1b3f /shell/hush_test
parentd91afa33fd6874aeed458a84ceeb2b51af84505d (diff)
downloadbusybox-fcf37c31838fbdd4f8cfe24c1c8ef957838a6de4.zip
busybox-fcf37c31838fbdd4f8cfe24c1c8ef957838a6de4.tar.gz
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
Diffstat (limited to 'shell/hush_test')
-rw-r--r--shell/hush_test/hush-misc/break5.right13
-rwxr-xr-xshell/hush_test/hush-misc/break5.tests4
2 files changed, 17 insertions, 0 deletions
diff --git a/shell/hush_test/hush-misc/break5.right b/shell/hush_test/hush-misc/break5.right
new file mode 100644
index 0000000..0b9df2a
--- /dev/null
+++ b/shell/hush_test/hush-misc/break5.right
@@ -0,0 +1,13 @@
+A
+B
+0
+A:a
+B
+D
+A:b
+B
+D
+A:c
+B
+D
+0
diff --git a/shell/hush_test/hush-misc/break5.tests b/shell/hush_test/hush-misc/break5.tests
new file mode 100755
index 0000000..273e040
--- /dev/null
+++ b/shell/hush_test/hush-misc/break5.tests
@@ -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 $?