summaryrefslogtreecommitdiffstats
path: root/regress/usr.bin/bc
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2003-10-18 19:58:51 +0000
committerotto <otto@openbsd.org>2003-10-18 19:58:51 +0000
commita215a80334d17ff5ec7d6ecbd0131f3e2ed60c52 (patch)
tree214bf54e4f130067eea7fc872dd3453c8f6f4545 /regress/usr.bin/bc
parento Fix assignment operators (+=, -=, ... ) (diff)
downloadwireguard-openbsd-a215a80334d17ff5ec7d6ecbd0131f3e2ed60c52.tar.xz
wireguard-openbsd-a215a80334d17ff5ec7d6ecbd0131f3e2ed60c52.zip
Regressions for continue.
Diffstat (limited to 'regress/usr.bin/bc')
-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