[glib: 1/2] Fix unit test on date format '%Z' which is too versatile to be trustable
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] Fix unit test on date format '%Z' which is too versatile to be trustable
- Date: Tue, 15 Feb 2022 11:47:00 +0000 (UTC)
commit 81764b6508de96302bdd0732fd898d346a1d6b1d
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date: Thu Feb 10 01:05:01 2022 +0100
Fix unit test on date format '%Z' which is too versatile to be trustable
glib/tests/date.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/glib/tests/date.c b/glib/tests/date.c
index 1eceec91b..15aacf9ee 100644
--- a/glib/tests/date.c
+++ b/glib/tests/date.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]