From: mpi Date: Tue, 31 Aug 2021 12:51:56 +0000 (+0000) Subject: 'if' tests. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=78122a2a360d631757dee375843fe6aa683f8d37;p=openbsd 'if' tests. --- diff --git a/regress/usr.sbin/btrace/Makefile b/regress/usr.sbin/btrace/Makefile index c5777834d0c..145512cf65a 100644 --- a/regress/usr.sbin/btrace/Makefile +++ b/regress/usr.sbin/btrace/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.10 2021/08/31 08:39:46 mpi Exp $ +# $OpenBSD: Makefile,v 1.11 2021/08/31 12:51:56 mpi Exp $ BTRACE?= /usr/sbin/btrace # scripts that don't need /dev/dt -BT_LANG_SCRIPTS= arithm beginend boolean comments delete exit map \ +BT_LANG_SCRIPTS= arithm beginend boolean comments delete exit if map \ map-unnamed maxoperand min+max+sum multismts nsecs+var \ precedence print diff --git a/regress/usr.sbin/btrace/if.bt b/regress/usr.sbin/btrace/if.bt new file mode 100644 index 00000000000..f11d67b645e --- /dev/null +++ b/regress/usr.sbin/btrace/if.bt @@ -0,0 +1,12 @@ +BEGIN { + if (0) + printf("nothing"); + + @var = 0; + if (@var) + printf("not printed\n"); + + if (1) { + printf("printed!\n"); + } +} diff --git a/regress/usr.sbin/btrace/if.ok b/regress/usr.sbin/btrace/if.ok new file mode 100644 index 00000000000..28bc8a945d3 --- /dev/null +++ b/regress/usr.sbin/btrace/if.ok @@ -0,0 +1 @@ +printed!