Regression for '%c'.
authormpi <mpi@openbsd.org>
Fri, 6 Sep 2024 08:00:36 +0000 (08:00 +0000)
committermpi <mpi@openbsd.org>
Fri, 6 Sep 2024 08:00:36 +0000 (08:00 +0000)
From Christian Ludwig.

regress/usr.sbin/btrace/Makefile
regress/usr.sbin/btrace/multismts.bt
regress/usr.sbin/btrace/printf.bt [new file with mode: 0644]
regress/usr.sbin/btrace/printf.ok [new file with mode: 0644]

index fb0a37b..10fc07f 100644 (file)
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.31 2024/02/05 15:30:04 mpi Exp $
+# $OpenBSD: Makefile,v 1.32 2024/09/06 08:00:36 mpi Exp $
 
 BTRACE?=                /usr/sbin/btrace
 ALLOWDT!=              sysctl -n kern.allowdt 2>/dev/null
@@ -8,8 +8,8 @@ BT_LANG_SCRIPTS=        arithm beginend beginend-argn 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 staticv-empty \
-                       syntaxerror tuple tupleeval vareval
+                       precedence print printf read-map-after-clear \
+                       staticv-empty syntaxerror tuple tupleeval vareval
 
 BT_ARG_LANG_SCRIPTS=   staticv str
 
index 74eaa49..67fbf7b 100644 (file)
@@ -1,5 +1,5 @@
 // Test multiple statements inside a single block;
 BEGIN {
        printf("One"); printf(", %d", "2");
-       printf(" %s three%c\n", "and", "!");
+       printf(" %s three!\n", "and");
 }
diff --git a/regress/usr.sbin/btrace/printf.bt b/regress/usr.sbin/btrace/printf.bt
new file mode 100644 (file)
index 0000000..f025d0b
--- /dev/null
@@ -0,0 +1,4 @@
+BEGIN {
+       $c = 0x41; // 'A'
+       printf("%c%c%c\n", $c, 0x41, 65);
+}
diff --git a/regress/usr.sbin/btrace/printf.ok b/regress/usr.sbin/btrace/printf.ok
new file mode 100644 (file)
index 0000000..43d5a8e
--- /dev/null
@@ -0,0 +1 @@
+AAA