Fix unit test on date format '%Z' which is too versatile to be trustable

This commit is contained in:
Emmanuel Fleury 2022-02-10 01:05:01 +01:00
parent a93a8db5d3
commit 81764b6508

View File

@ -722,7 +722,6 @@ test_strftime (void)
{ "%X", "12:00:00 AM" },
{ "%x", "" },
{ "%Y", "0001" },
{ "%Z", "Pacific Standard Time" },
#else
{ "%B", "January" },
{ "%b", "Jan" },
@ -802,6 +801,11 @@ test_strftime (void)
g_assert_cmpstr (buf, ==, strftime_checks[i].expect);
}
/* Time zone is too versatile on OS_WIN32 to be checked precisely */
#ifdef G_OS_WIN32
g_assert_cmpint (g_date_strftime (buf, sizeof (buf), "%Z", d), !=, 0);
#endif
g_date_free (d);
setlocale (LC_ALL, oldlocale);