Test for operator precedence
authormpi <mpi@openbsd.org>
Tue, 31 Aug 2021 08:39:46 +0000 (08:39 +0000)
committermpi <mpi@openbsd.org>
Tue, 31 Aug 2021 08:39:46 +0000 (08:39 +0000)
regress/usr.sbin/btrace/Makefile
regress/usr.sbin/btrace/precedence.bt [new file with mode: 0644]
regress/usr.sbin/btrace/precedence.ok [new file with mode: 0644]

index 9310d32..c577783 100644 (file)
@@ -1,11 +1,11 @@
-# $OpenBSD: Makefile,v 1.9 2021/04/21 10:30:46 mpi Exp $
+# $OpenBSD: Makefile,v 1.10 2021/08/31 08:39:46 mpi Exp $
 
 BTRACE?=                /usr/sbin/btrace
 
 # scripts that don't need /dev/dt
 BT_LANG_SCRIPTS=       arithm beginend boolean comments delete exit map \
                        map-unnamed maxoperand min+max+sum multismts nsecs+var \
-                       print
+                       precedence print
 
 BT_KERN_SCRIPTS=
 
diff --git a/regress/usr.sbin/btrace/precedence.bt b/regress/usr.sbin/btrace/precedence.bt
new file mode 100644 (file)
index 0000000..665ddae
--- /dev/null
@@ -0,0 +1,4 @@
+BEGIN
+{
+       printf("%d\n", 2 + 3 * 4 + 3);
+}
diff --git a/regress/usr.sbin/btrace/precedence.ok b/regress/usr.sbin/btrace/precedence.ok
new file mode 100644 (file)
index 0000000..98d9bcb
--- /dev/null
@@ -0,0 +1 @@
+17