diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-25 17:07:51 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-25 17:07:51 +0100 |
commit | 5fa74b9efc538b55ec164ce3886eeea782016487 (patch) | |
tree | a83a0aeb487e238aec783b51446885c242a01cd2 /testsuite | |
parent | d4b721cc8b708a2fa4ddd821179c00865c11619e (diff) |
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')
-rwxr-xr-x | testsuite/bc.tests | 7 |
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" \ |