* tests/test-fprintf-posix.h (test_function): Test %b directive.
* tests/test-printf-posix.h (test_function): Likewise.
* tests/test-dprintf-posix.c (test_function): Likewise.
* tests/test-printf-posix.output: Update expected test result.
+2024-06-30 Bruno Haible <bruno@clisp.org>
+
+ *printf-posix-tests: Strengthen tests.
+ * tests/test-fprintf-posix.h (test_function): Test %b directive.
+ * tests/test-printf-posix.h (test_function): Likewise.
+ * tests/test-dprintf-posix.c (test_function): Likewise.
+ * tests/test-printf-posix.output: Update expected test result.
+
2024-06-30 Bruno Haible <bruno@clisp.org>
*printf-{posix,gnu}: Tweak module descriptions.
/* Precision with rounding. */
my_dprintf (fileno (stdout), "%.2LF %d\n", 999.996L, 33, 44, 55);
+ /* Test the support of the %b format directive. */
+
+ /* This test would fail on glibc 2.34, musl libc, macOS 14,
+ FreeBSD 13.2, NetBSD 10.0, OpenBSD 7.5, AIX 7.3, Solaris 11.4. */
+ my_dprintf (fileno (stdout), "%b %d\n", 12345, 33, 44, 55);
+
/* Test the support of the POSIX/XSI format strings with positions. */
my_dprintf (fileno (stdout), "%2$d %1$d\n", 33, 55);
/* Precision with rounding. */
my_fprintf (stdout, "%.2LF %d\n", 999.996L, 33, 44, 55);
+ /* Test the support of the %b format directive. */
+
+ /* This test would fail on glibc 2.34, musl libc, macOS 14,
+ FreeBSD 13.2, NetBSD 10.0, OpenBSD 7.5, AIX 7.3, Solaris 11.4. */
+ my_fprintf (stdout, "%b %d\n", 12345, 33, 44, 55);
+
/* Test the support of the POSIX/XSI format strings with positions. */
my_fprintf (stdout, "%2$d %1$d\n", 33, 55);
/* Precision with rounding. */
my_printf ("%.2LF %d\n", 999.996L, 33, 44, 55);
+ /* Test the support of the %b format directive. */
+
+ /* This test would fail on glibc 2.34, musl libc, macOS 14,
+ FreeBSD 13.2, NetBSD 10.0, OpenBSD 7.5, AIX 7.3, Solaris 11.4. */
+ my_printf ("%b %d\n", 12345, 33, 44, 55);
+
/* Test the support of the POSIX/XSI format strings with positions. */
my_printf ("%2$d %1$d\n", 33, 55);
1234 33
999.95 33
1000.00 33
+11000000111001 33
55 33