]> Savannah Git Hosting - gnulib.git/commitdiff
nstrftime, c-nstrftime tests: Avoid some failures on native Windows.
authorBruno Haible <bruno@clisp.org>
Mon, 27 May 2024 22:10:42 +0000 (00:10 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 27 May 2024 22:10:42 +0000 (00:10 +0200)
* tests/test-nstrftime.h (tzalloc_test): On native Windows, ignore
differences in the way the time zone is printed.

ChangeLog
tests/test-nstrftime.h

index a49563431c5b5ebc5c6f6ad4e15926c7a82bfcf7..d06307f7a0811ba7578f44e9a878d57b71631657 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-05-27  Bruno Haible  <bruno@clisp.org>
+
+       nstrftime, c-nstrftime tests: Avoid some failures on native Windows.
+       * tests/test-nstrftime.h (tzalloc_test): On native Windows, ignore
+       differences in the way the time zone is printed.
+
 2024-05-27  Bruno Haible  <bruno@clisp.org>
 
        nstrftime, c-nstrftime: Make %r work on native Windows.
index 18828ae91d81d922ed2ebc27805dad546f9c7fe9..6a6b10daeaa7f6424e0f1838abb698025584bd62 100644 (file)
@@ -219,7 +219,12 @@ tzalloc_test (void)
       if (! (STREQ (buf, LT[i].exp)
              || (!tz && n == strlen (LT[i].exp)
                  && memcmp (buf, LT[i].exp, n - sizeof "(GMT)" + 1) == 0
-                 && STREQ (buf + n - sizeof "(GMT)" + 1, "(GMT)"))))
+                 && STREQ (buf + n - sizeof "(GMT)" + 1, "(GMT)"))
+#if defined _WIN32 && !defined __CYGWIN__
+             /* On native Windows, the time zone is printed differently.  */
+             || strncmp (buf, LT[i].exp, 21) == 0
+#endif
+         )  )
         {
           /* Don't fail for unhandled dst in ahistorical entries,
              as gnulib doesn't currently fix that issue, seen on Darwin 14.  */