]> Savannah Git Hosting - gnulib.git/commitdiff
xstrtol, xstrtoll tests: Avoid test failure after 2024-07-25 change.
authorBruno Haible <bruno@clisp.org>
Mon, 29 Jul 2024 14:46:02 +0000 (16:46 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 29 Jul 2024 14:46:02 +0000 (16:46 +0200)
* tests/test-xstrtol.c (main): Update expected test results.

tests/test-xstrtol.c

index 5891f4bbfd597181b0e355af891bc133106f7e04..cbb394912e42a2e2ca304886876942a66ba23fc8 100644 (file)
@@ -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;
     }