From 8b3bda8c07debe55258e6fefee4a0a14f0d16cea Mon Sep 17 00:00:00 2001 From: mpi Date: Tue, 31 Aug 2021 08:39:46 +0000 Subject: [PATCH] Test for operator precedence --- regress/usr.sbin/btrace/Makefile | 4 ++-- regress/usr.sbin/btrace/precedence.bt | 4 ++++ regress/usr.sbin/btrace/precedence.ok | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 regress/usr.sbin/btrace/precedence.bt create mode 100644 regress/usr.sbin/btrace/precedence.ok diff --git a/regress/usr.sbin/btrace/Makefile b/regress/usr.sbin/btrace/Makefile index 9310d320247..c5777834d0c 100644 --- a/regress/usr.sbin/btrace/Makefile +++ b/regress/usr.sbin/btrace/Makefile @@ -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 index 00000000000..665ddaeb701 --- /dev/null +++ b/regress/usr.sbin/btrace/precedence.bt @@ -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 index 00000000000..98d9bcb75a6 --- /dev/null +++ b/regress/usr.sbin/btrace/precedence.ok @@ -0,0 +1 @@ +17 -- 2.20.1