mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 21:16:15 +01:00
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
This commit is contained in:
parent
7fe793e125
commit
9cadb90b35
@ -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 { \
|
||||
|
Loading…
Reference in New Issue
Block a user