+2023-04-24 Bruno Haible <bruno@clisp.org>
+
+ *sprintf tests: Avoid test failures on mingw 10.
+ * tests/test-vasnprintf-posix.c (test_function): On newer mingw, expect
+ the de-facto standard result.
+ * tests/test-vasprintf-posix.c (test_function): Likewise.
+ * tests/test-snprintf-posix.h (test_function): Likewise.
+ * tests/test-sprintf-posix.h (test_function): Likewise.
+
2023-04-23 Bruno Haible <bruno@clisp.org>
Improve quoting of AS_HELP_STRING's first argument.
/* Neither ISO C nor POSIX specify that the '0' flag is ignored when a width
and a precision are both present. But most implementations do so. */
#ifdef __MINGW32__
- ASSERT (strcmp (result, "00000000000303c 33") == 0);
+ ASSERT (strcmp (result, "00000000000303c 33") == 0 /* mingw 5 */
+ || strcmp (result, " 000000303c 33") == 0 /* mingw 10 */);
#else
ASSERT (strcmp (result, " 000000303c 33") == 0);
#endif
/* Neither ISO C nor POSIX specify that the '0' flag is ignored when a width
and a precision are both present. But most implementations do so. */
#ifdef __MINGW32__
- ASSERT (strcmp (result, "0x000000000303c 33") == 0);
+ ASSERT (strcmp (result, "0x000000000303c 33") == 0 /* mingw 5 */
+ || strcmp (result, " 0x000000303c 33") == 0 /* mingw 10 */);
#else
ASSERT (strcmp (result, " 0x000000303c 33") == 0);
#endif
/* Neither ISO C nor POSIX specify that the '0' flag is ignored when a width
and a precision are both present. But most implementations do so. */
#ifdef __MINGW32__
- ASSERT (strcmp (result, "00000000000303c 33") == 0);
+ ASSERT (strcmp (result, "00000000000303c 33") == 0 /* mingw 5 */
+ || strcmp (result, " 000000303c 33") == 0 /* mingw 10 */);
#else
ASSERT (strcmp (result, " 000000303c 33") == 0);
#endif
/* Neither ISO C nor POSIX specify that the '0' flag is ignored when a width
and a precision are both present. But most implementations do so. */
#ifdef __MINGW32__
- ASSERT (strcmp (result, "0x000000000303c 33") == 0);
+ ASSERT (strcmp (result, "0x000000000303c 33") == 0 /* mingw 5 */
+ || strcmp (result, " 0x000000303c 33") == 0 /* mingw 10 */);
#else
ASSERT (strcmp (result, " 0x000000303c 33") == 0);
#endif
/* Neither ISO C nor POSIX specify that the '0' flag is ignored when a width
and a precision are both present. But most implementations do so. */
#ifdef __MINGW32__
- ASSERT (strcmp (result, "00000000000303c 33") == 0);
+ ASSERT (strcmp (result, "00000000000303c 33") == 0 /* mingw 5 */
+ || strcmp (result, " 000000303c 33") == 0 /* mingw 10 */);
#else
ASSERT (strcmp (result, " 000000303c 33") == 0);
#endif
/* Neither ISO C nor POSIX specify that the '0' flag is ignored when a width
and a precision are both present. But most implementations do so. */
#ifdef __MINGW32__
- ASSERT (strcmp (result, "0x000000000303c 33") == 0);
+ ASSERT (strcmp (result, "0x000000000303c 33") == 0 /* mingw 5 */
+ || strcmp (result, " 0x000000303c 33") == 0 /* mingw 10 */);
#else
ASSERT (strcmp (result, " 0x000000303c 33") == 0);
#endif
/* Neither ISO C nor POSIX specify that the '0' flag is ignored when a width
and a precision are both present. But most implementations do so. */
#ifdef __MINGW32__
- ASSERT (strcmp (result, "00000000000303c 33") == 0);
+ ASSERT (strcmp (result, "00000000000303c 33") == 0 /* mingw 5 */
+ || strcmp (result, " 000000303c 33") == 0 /* mingw 10 */);
#else
ASSERT (strcmp (result, " 000000303c 33") == 0);
#endif
/* Neither ISO C nor POSIX specify that the '0' flag is ignored when a width
and a precision are both present. But most implementations do so. */
#ifdef __MINGW32__
- ASSERT (strcmp (result, "0x000000000303c 33") == 0);
+ ASSERT (strcmp (result, "0x000000000303c 33") == 0 /* mingw 5 */
+ || strcmp (result, " 0x000000303c 33") == 0 /* mingw 10 */);
#else
ASSERT (strcmp (result, " 0x000000303c 33") == 0);
#endif