diff options
author | Rafal Luzynski <digitalfreak@lingonborough.com> | 2018-03-13 01:02:11 +0100 |
---|---|---|
committer | Philip Withnall <withnall@endlessm.com> | 2018-03-13 10:49:38 +0000 |
commit | 9cadb90b35af5820bc1ee9f527fcf92a2f145cb3 (patch) | |
tree | 5a0afd29078167985696933ccbfb990406acc751 | |
parent | 7fe793e125c316ac34edd8158df5a132cb044bc1 (diff) | |
download | glib-9cadb90b35af5820bc1ee9f527fcf92a2f145cb3.tar.gz |
tests: Compare month names case-insensitively
This patch relaxes the comparison rules and allow the month names to be
in a mixed case.
Translators should be allowed to provide the month names in a different
case (lower/upper case, not grammatical case) from the content of glibc
because it is disputable at the moment whether the month names should
follow the language rules strictly and be titlecased only if it is
obligatory to titlecase them or they should be also titlecased in the
standalone case. Hopefully in future a conversion specifier will be
invented to control the upper/lower case individually.
https://bugzilla.gnome.org/show_bug.cgi?id=793645
-rw-r--r-- | glib/tests/gdatetime.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c index b06e2eacc..5a2190d5f 100644 --- a/glib/tests/gdatetime.c +++ b/glib/tests/gdatetime.c @@ -1330,8 +1330,12 @@ GDateTime *__dt = g_date_time_new_local (2009, 10, 24, 0, 0, 0);\ #define TEST_PRINTF_DATE(y,m,d,f,o) G_STMT_START { \ GDateTime *dt = g_date_time_new_local (y, m, d, 0, 0, 0); \ gchar *p = g_date_time_format (dt, (f)); \ - g_assert_cmpstr (p, ==, (o)); \ + gchar *o_casefold = g_utf8_casefold (o, -1); \ + gchar *p_casefold = g_utf8_casefold (p, -1); \ + g_assert_cmpstr (p_casefold, ==, (o_casefold)); \ g_date_time_unref (dt); \ + g_free (p_casefold); \ + g_free (o_casefold); \ g_free (p); } G_STMT_END #define TEST_PRINTF_TIME(h,m,s,f,o) G_STMT_START { \ |