This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [v4] Fix strptime era handling, add more era tests [BZ #24394]
- From: TAMUKI Shoichi <tamuki at linet dot gr dot jp>
- To: DJ Delorie <dj at redhat dot com>
- Cc: Carlos O'Donell <codonell at redhat dot com>, Rafal Luzynski <digitalfreak at lingonborough dot com>, libc-alpha at sourceware dot org
- Date: Fri, 29 Mar 2019 15:50:15 +0900
- Subject: Re: [v4] Fix strptime era handling, add more era tests [BZ #24394]
- References: <xnbm1upd30.fsf@greed.delorie.com>
Hello DJ Delorie-san,
Thank you for creating this test case.
From: DJ Delorie <dj@redhat.com>
Subject: [v4] Fix strptime era handling, add more era tests [BZ #24394]
Date: Thu, 28 Mar 2019 23:35:31 -0400
> diff --git a/ChangeLog b/ChangeLog
> index bd76c1e28d..db33d8a6a3 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,10 @@
> +2019-03-28 DJ Delorie <dj@redhat.com>
> +
> + [BZ #24394]
> + * time/strptime_l.c (%Ey): Fix fencepost error.
> + * time/tst-strftime3.c: New.
> + * time/Makefile (tests): Add tst-strftime3.
This test case is intended to check whether strptime can correctly
parse %EY, so it would be nice to rename it to tst-strptime4.c.
The test case to check whether strftime can correctly format %EY
already exists as tst-strftime2.c. This covers ja_JP, lo_LA, th_TH,
zh_TW, cmn_TW, hak_TW, nan_TW, and lzh_TW. Regarding *_TW, Rafal-san
is preparing a patch.
In addition to ja_JP locale, I think it is necessary to check the
locale of other countries, in particular *_TW locale.
What about the consideration of %EY, %_EY, and %-EY?
How does it behave if specifying a non-existent date, such as:
Heisei gan nen 01 gatsu 07 nichi
Showa 64 nen 01 gatsu 08 nichi
I think that these tests are also necessary.
Regards,
TAMUKI Shoichi