From 9af791d17297d38a9e990204cd4b8bb68e764843 Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Fri, 6 Sep 2024 08:00:37 +0000 Subject: Regression for '%c'. From Christian Ludwig. --- regress/usr.sbin/btrace/Makefile | 6 +++--- regress/usr.sbin/btrace/multismts.bt | 2 +- regress/usr.sbin/btrace/printf.bt | 4 ++++ regress/usr.sbin/btrace/printf.ok | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 regress/usr.sbin/btrace/printf.bt create mode 100644 regress/usr.sbin/btrace/printf.ok (limited to 'regress/usr.sbin') diff --git a/regress/usr.sbin/btrace/Makefile b/regress/usr.sbin/btrace/Makefile index fb0a37bfc4e..10fc07fd091 100644 --- a/regress/usr.sbin/btrace/Makefile +++ b/regress/usr.sbin/btrace/Makefile @@ -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 diff --git a/regress/usr.sbin/btrace/multismts.bt b/regress/usr.sbin/btrace/multismts.bt index 74eaa498676..67fbf7befa1 100644 --- a/regress/usr.sbin/btrace/multismts.bt +++ b/regress/usr.sbin/btrace/multismts.bt @@ -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 index 00000000000..f025d0bbc27 --- /dev/null +++ b/regress/usr.sbin/btrace/printf.bt @@ -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 index 00000000000..43d5a8ed6ef --- /dev/null +++ b/regress/usr.sbin/btrace/printf.ok @@ -0,0 +1 @@ +AAA -- cgit v1.2.3