gdatetime: Fix ja_JA.eucjp expectations when eras are unsupported

I can't read Japanese, but these match the output of:

    env TZ=UTC LC_ALL=ja_JP.eucjp date -d2009-10-24T00:00:00Z '+%c' | iconv -f eucjp -t UTF-8
    env TZ=UTC LC_ALL=ja_JP.eucjp date -d2009-10-24T00:00:00Z '+%C' | iconv -f eucjp -t UTF-8

which seem like a reasonable thing to use as a reference.

According to Google Translate, 平成 refers to the Heisei era, which was
current during 2009, and seems unreasonable to expect as output on a
platform where era-based dates are unsupported.

Resolves: https://gitlab.gnome.org/GNOME/glib/-/issues/3252
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2024-02-13 10:17:53 +00:00
parent 342fa9c161
commit 988f4204a1

View File

@ -1733,8 +1733,8 @@ test_non_utf8_printf (void)
TEST_PRINTF ("%Ey", "21");
TEST_PRINTF ("%EY", "平成21年");
#else
TEST_PRINTF ("%Ec", "平成21年10月24日 00時00分00秒");
TEST_PRINTF ("%EC", "平成");
TEST_PRINTF ("%Ec", "2009年10月24日 00時00分00秒");
TEST_PRINTF ("%EC", "20");
TEST_PRINTF ("%Ex", "2009\345\271\26410\346\234\21024\346\227\245");
TEST_PRINTF ("%EX", "00\346\231\20200\345\210\20600\347\247\222");
TEST_PRINTF ("%Ey", "09");