This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 3/3] time: Add tests for Minguo calendar [BZ #24293]
17.03.2019 11:35 TAMUKI Shoichi <tamuki@linet.gr.jp> wrote:
>
> Hello Rafal-san,
>
> From: Rafal Luzynski <digitalfreak@lingonborough.com>
> Subject: [PATCH 3/3] time: Add tests for Minguo calendar [BZ #24293]
> Date: Fri, 15 Mar 2019 12:49:27 +0100 (CET)
>
> > [BZ #24293]
> > * time/Makefile (LOCALES): Add cmn_TW.UTF-8 and zh_TW.UTF-8.
> > * time/tst-strftime2.c (locales): Likewise.
>
> Since cmn_TW.UTF8 and zh_TW.UTF-8 are practically the same, I think
> that the test of only zh_TW.UTF-8 is sufficient.
My intention was to ensure that the patch works not just for zh_TW
but also for other locales. What is the recommended *_TW which is
sufficiently different from zh_TW?
I admit the content of all *_TW locales is the same here. If indeed
all these locales are so similar I don't mind to remove cmn_TW
and leave zh_TW only.
> > (dates): Add 1910-04-01, 1911-12-31, 1912-07-29, 1912-07-30,
> > and 1913-04-01.
>
> It is recommended to add 2010 and 2011 to see Y1C issue of Minguo
> calendar.
Good idea, thank you.
> [...]
> > @@ -37,6 +38,11 @@ typedef struct
> >
> > static const date_t dates[] =
> > {
> > + { 1, 4, 1910 },
> > + { 31, 12, 1911 },
> > + { 29, 7, 1912 },
> > + { 30, 7, 1912 },
> > + { 1, 4, 1913 },
> > { 1, 4, 1988 },
> > { 7, 1, 1989 },
> > { 8, 1, 1989 },
>
> It is recommended to add 2010 and 2011. Also, please align existing
> lines.
>
> Recommend instead:
>
> | @@ -37,12 +38,19 @@ typedef struct
> |
> | static const date_t dates[] =
> | {
> | - { 1, 4, 1988 },
> | - { 7, 1, 1989 },
> | - { 8, 1, 1989 },
> | - { 1, 4, 1990 },
> | - { 1, 4, 1997 },
> | - { 1, 4, 1998 }
> | + { 1, 4, 1910 },
> | + { 31, 12, 1911 },
> | + { 29, 7, 1912 },
> | + { 30, 7, 1912 },
> | + { 1, 4, 1913 },
> | + { 1, 4, 1988 },
> | + { 7, 1, 1989 },
> | + { 8, 1, 1989 },
> | + { 1, 4, 1990 },
> | + { 1, 4, 1997 },
> | + { 1, 4, 1998 },
> | + { 1, 4, 2010 },
> | + { 1, 4, 2011 }
> | };
> |
> | static char ref[array_length (locales)][array_length (formats)]
I always hesitate to make formatting changes but since the original
author asks for this I will not hesitate this time.
Again, thank you for your feedback and please answer the questions
which you are able to answer.
Regards,
Rafal