summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2003-10-18 19:58:52 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2003-10-18 19:58:52 +0000
commitc52b7e74751dd0d7f279b191d690682aea929e57 (patch)
tree2365223f576207452a6e8dcbb0b809eeac92fb4f /regress/usr.bin
parent54e128fd59038d206f8cb7a77b5ec8ee3fd447ea (diff)
Regressions for continue.
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/bc/Makefile7
-rw-r--r--regress/usr.bin/bc/t8.in6
-rw-r--r--regress/usr.bin/bc/t8.out7
-rw-r--r--regress/usr.bin/bc/t9.in19
-rw-r--r--regress/usr.bin/bc/t9.out11
5 files changed, 48 insertions, 2 deletions
diff --git a/regress/usr.bin/bc/Makefile b/regress/usr.bin/bc/Makefile
index d2c3919f40d..f4750fef1a3 100644
--- a/regress/usr.bin/bc/Makefile
+++ b/regress/usr.bin/bc/Makefile
@@ -1,8 +1,8 @@
-# $OpenBSD: Makefile,v 1.1 2003/09/25 19:40:07 otto Exp $
+# $OpenBSD: Makefile,v 1.2 2003/10/18 19:58:51 otto Exp $
BC=bc
-REGRESS_TARGETS=t1 t2 t3 t4 t5 t6
+REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8 t9
# .in: input file
# .out: desired result
@@ -13,6 +13,9 @@ REGRESS_TARGETS=t1 t2 t3 t4 t5 t6
# t4: deep nested while loop
# t5: function definition and call
# t6: empty if statement
+# t7: assignment ops
+# t8: continue ops
+# t9: more continue
all: clean ${REGRESS_TARGET}
diff --git a/regress/usr.bin/bc/t8.in b/regress/usr.bin/bc/t8.in
new file mode 100644
index 00000000000..b2f1c180d67
--- /dev/null
+++ b/regress/usr.bin/bc/t8.in
@@ -0,0 +1,6 @@
+while (a < 10) {
+ a += 1;
+ if (a == 2) if (1) continue;
+ if (a == 7) if (1) continue;
+ a
+}
diff --git a/regress/usr.bin/bc/t8.out b/regress/usr.bin/bc/t8.out
new file mode 100644
index 00000000000..d48428c37fb
--- /dev/null
+++ b/regress/usr.bin/bc/t8.out
@@ -0,0 +1,7 @@
+[ 2J]s2
+[ 1 0!=2 ]s1
+[ 2J]s4
+[ 1 0!=4 ]s3
+[la 1+sala 2=1 la 7=3 laps.Mla 10>0]s0
+la 10>0
+q \ No newline at end of file
diff --git a/regress/usr.bin/bc/t9.in b/regress/usr.bin/bc/t9.in
new file mode 100644
index 00000000000..7556e18b313
--- /dev/null
+++ b/regress/usr.bin/bc/t9.in
@@ -0,0 +1,19 @@
+define x() {
+ for (i = 0; i < 10; i++) {
+ i
+ "a ";
+ if (i == 5) {
+ "b ";
+ continue
+ }
+ "aaaaMbbbb"
+ a=0;
+ while (a < 4) {
+ a += 1;
+ if (a == 2) if (1) continue
+ "c "; a
+ }
+ }
+}
+
+x()
diff --git a/regress/usr.bin/bc/t9.out b/regress/usr.bin/bc/t9.out
new file mode 100644
index 00000000000..9a5ca850362
--- /dev/null
+++ b/regress/usr.bin/bc/t9.out
@@ -0,0 +1,11 @@
+[[b ]P 1J]s1
+[ 2J]s4
+[ 1 0!=4 ]s3
+[la 1+sala 2=3 [c ]Plaps.Mla 4>2]s2
+[lips.[a ]Pli 5=1 [aaaaMbbbb]P 0sala 4>2 Mlid1+sis.li 10>0]s0
+[ 0dsis.li 10>0 0 1Q]s
+
+
+
+lxps.
+q \ No newline at end of file