bc: for(;;) fix from upstream

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2018-12-21 00:35:22 +01:00
parent 047154472a
commit 52caa007e3
2 changed files with 12 additions and 1 deletions

View File

@@ -51,6 +51,11 @@ testing "bc if 0 else if 1" \
"2\n9\n" \
"" "if (0) 1 else if (1) 2; 9"
testing "bc for(;;)" \
"bc" \
"2\n3\n2\n9\n" \
"" "i=2; for (;;) { 2; if(--i==0) break; 3; }; 9"
testing "bc define auto" \
"bc" \
"8\n9\n" \