From: Bruno Haible Date: Mon, 27 May 2024 22:10:42 +0000 (+0200) Subject: nstrftime, c-nstrftime tests: Avoid some failures on native Windows. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=8557380019af08962cf2273643bc2bf2e50448e7;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index a49563431c..d06307f7a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-05-27 Bruno Haible + + 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 nstrftime, c-nstrftime: Make %r work on native Windows. diff --git a/tests/test-nstrftime.h b/tests/test-nstrftime.h index 18828ae91d..6a6b10daea 100644 --- a/tests/test-nstrftime.h +++ b/tests/test-nstrftime.h @@ -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. */