aboutsummaryrefslogtreecommitdiff
path: root/testsuite/bc.tests
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-12-25 17:07:51 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-12-25 17:07:51 +0100
commit5fa74b9efc538b55ec164ce3886eeea782016487 (patch)
treea83a0aeb487e238aec783b51446885c242a01cd2 /testsuite/bc.tests
parentd4b721cc8b708a2fa4ddd821179c00865c11619e (diff)
downloadbusybox-5fa74b9efc538b55ec164ce3886eeea782016487.tar.gz
bc: allow {break} and {continue} (allow RBRACE to terminate them)
function old new delta zbc_parse_stmt_possibly_auto 1599 1560 -39 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/bc.tests')
-rwxr-xr-xtestsuite/bc.tests7
1 files changed, 6 insertions, 1 deletions
diff --git a/testsuite/bc.tests b/testsuite/bc.tests
index c84a2987c..42fe83013 100755
--- a/testsuite/bc.tests
+++ b/testsuite/bc.tests
@@ -66,7 +66,7 @@ testing "bc if 0 else if 1" \
"2\n9\n" \
"" "if (0) 1 else if (1) 2; 9"
-testing "bc for(;;)" \
+testing "bc for (;;)" \
"bc" \
"2\n3\n2\n9\n" \
"" "i=2; for (;;) { 2; if(--i==0) break; 3; }; 9"
@@ -86,6 +86,11 @@ testing "bc for (init;cond;upd)" \
"1\n2\n3\n9\n" \
"" "for(i=1;i<4;i++)i; 9"
+testing "bc for (;;) {break}" \
+ "bc" \
+ "2\n9\n" \
+ "" "for (;;) {2;break}; 9"
+
testing "bc define auto" \
"bc" \
"8\n9\n" \