On Cygwin 2.9.0 I'm seeing a test failure:
  FAIL: test-xstrtol.sh

This patch avoids the failure, acknowledging that the results here
are different on different Cygwin versions.


2025-01-05  Bruno Haible  <br...@clisp.org>

        xstrtol, xstrtoll tests: Avoid test failure after 2024-07-25 change.
        * tests/test-xstrtol.c (main): Update expected test results regarding
        Cygwin 2.9.0.

diff --git a/tests/test-xstrtol.c b/tests/test-xstrtol.c
index a8291bb937..fe68dc00e6 100644
--- a/tests/test-xstrtol.c
+++ b/tests/test-xstrtol.c
@@ -70,13 +70,13 @@ main (int argc, char **argv)
 
       /* Test an invalid base (undefined behaviour, as documented in 
xstrtol.h).
          Reported by Alejandro Colomar.  */
-#if !defined _MSC_VER
+#if !(defined __CYGWIN__ || 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__ || defined __CYGWIN__ || is_GNULIB_strtol)
+# if !(defined __GLIBC__ || is_GNULIB_strtol)
         ASSERT (s_err == LONGINT_OK);
         ASSERT (endp == input + 1);
         ASSERT (val == 1024);




Reply via email to