From adc8123f4dbae67592d019c79f6e13b4e71e2f73 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 29 Jul 2024 16:46:02 +0200 Subject: [PATCH] xstrtol, xstrtoll tests: Avoid test failure after 2024-07-25 change. * tests/test-xstrtol.c (main): Update expected test results. --- tests/test-xstrtol.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/test-xstrtol.c b/tests/test-xstrtol.c index 5891f4bbfd..cbb394912e 100644 --- a/tests/test-xstrtol.c +++ b/tests/test-xstrtol.c @@ -69,20 +69,22 @@ main (int argc, char **argv) /* Test an invalid base (undefined behaviour, as documented in xstrtol.h). Reported by Alejandro Colomar. */ +#if !defined _MSC_VER { const char input[] = "k"; char *endp = NULL; __strtol_t val = -17; strtol_error s_err = __xstrtol (input, &endp, -1, &val, "k"); -#if !defined __GLIBC__ +# if !(defined __GLIBC__ || defined __CYGWIN__) ASSERT (s_err == LONGINT_OK); ASSERT (endp == input + 1); ASSERT (val == 1024); -#else +# else ASSERT (s_err == LONGINT_INVALID); ASSERT (val == -17); -#endif +# endif } +#endif return test_exit_status; } -- 2.39.5