summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/bc.tests31
1 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/bc.tests b/testsuite/bc.tests
index 21b2600..987461e 100755
--- a/testsuite/bc.tests
+++ b/testsuite/bc.tests
@@ -76,6 +76,37 @@ testing "bc print 1,2,3" \
"123" \
"" "print 1,2,3"
+testing "bc nested loops and breaks" \
+ "bc" \
+ "\
+11
+21
+31
+22
+12
+99
+" \
+ "" "\
+if(1) {
+ 11
+ while(1) {
+ 21
+ while(1) {
+ 31
+ break
+ 32
+ }
+ 22
+ break
+ 23
+ }
+ 12
+} else {
+ 88
+}
+99
+"
+
tar xJf bc_large.tar.xz
for f in bc*.bc; do