add test for printing empty arguments
authorjasper <jasper@openbsd.org>
Thu, 9 Sep 2021 20:08:15 +0000 (20:08 +0000)
committerjasper <jasper@openbsd.org>
Thu, 9 Sep 2021 20:08:15 +0000 (20:08 +0000)
ok mpi@

regress/usr.sbin/btrace/Makefile
regress/usr.sbin/btrace/staticv-empty.bt [new file with mode: 0644]
regress/usr.sbin/btrace/staticv-empty.ok [new file with mode: 0644]

index bbe1807..30b63b4 100644 (file)
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.20 2021/09/09 19:02:50 jasper Exp $
+# $OpenBSD: Makefile,v 1.21 2021/09/09 20:08:15 jasper Exp $
 
 BTRACE?=                /usr/sbin/btrace
 ALLOWDT!=              sysctl -n kern.allowdt
@@ -8,7 +8,8 @@ BT_LANG_SCRIPTS=        arithm beginend boolean comments delete exit \
                        histempty if \
                        map mapclear mapempty mapsyntax mapzero map-unnamed \
                        maxoperand min+max+sum multismts nsecs+var \
-                       precedence print read-map-after-clear syntaxerror
+                       precedence print read-map-after-clear staticv-empty \
+                       syntaxerror
 
 # scripts that use kernel probes
 BT_KERN_SCRIPTS=       multiprobe
diff --git a/regress/usr.sbin/btrace/staticv-empty.bt b/regress/usr.sbin/btrace/staticv-empty.bt
new file mode 100644 (file)
index 0000000..288ba32
--- /dev/null
@@ -0,0 +1,4 @@
+BEGIN
+{
+       printf("'%s'\n", $1);
+}
diff --git a/regress/usr.sbin/btrace/staticv-empty.ok b/regress/usr.sbin/btrace/staticv-empty.ok
new file mode 100644 (file)
index 0000000..a614936
--- /dev/null
@@ -0,0 +1 @@
+''