aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/bc.tests15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/bc.tests b/testsuite/bc.tests
index edff209bb..b3ce894ee 100755
--- a/testsuite/bc.tests
+++ b/testsuite/bc.tests
@@ -56,6 +56,21 @@ testing "bc for(;;)" \
"2\n3\n2\n9\n" \
"" "i=2; for (;;) { 2; if(--i==0) break; 3; }; 9"
+testing "bc for (;cond;)" \
+ "bc" \
+ "1\n2\n3\n9\n" \
+ "" "i=0; for(;i<3;)++i; 9"
+
+testing "bc for (;cond;upd)" \
+ "bc" \
+ "1\n2\n3\n9\n" \
+ "" "i=1; for(;i<4;i++)i; 9"
+
+testing "bc for (init;cond;upd)" \
+ "bc" \
+ "1\n2\n3\n9\n" \
+ "" "for(i=1;i<4;i++)i; 9"
+
testing "bc define auto" \
"bc" \
"8\n9\n" \