From patchwork Mon Apr 1 19:28:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 32123 Received: (qmail 109859 invoked by alias); 1 Apr 2019 19:28:28 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 109840 invoked by uid 89); 1 Apr 2019 19:28:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.2 required=5.0 tests=AWL, BAYES_00, BODY_8BITS, GARBLED_BODY, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HContent-type:plain, HContent-type:charset, HContent-type:text, HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com Date: Mon, 01 Apr 2019 15:28:22 -0400 Message-Id: From: DJ Delorie To: libc-alpha@sourceware.org CC: Rafal Luzynski , tamuki@linet.gr.jp Subject: [v1] Add Reiwa era tests to time/tst-strftime3.c MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Conditional, of course, on bz24405 making the era change, and someone verifying the results are correct ;-) 2019-04-01 DJ Delorie * time/tst-strftime3.c: Add Reiwa era tests. Reviewed-by: Carlos O'Donell diff --git a/time/tst-strftime3.c b/time/tst-strftime3.c index a4c427b3b6..22e2982d4b 100644 --- a/time/tst-strftime3.c +++ b/time/tst-strftime3.c @@ -291,6 +291,62 @@ const Data data[] = { 1990, Jan, 1, Mon, 12, 00, 00, "ja_JP.EUC-JP", "%EY", /* 02 平成02年 */ "\xca\xbf\xc0\xae""02\xc7\xaf" }, + + + { "Japanese era change, 2019, before transition year", + 2018, Dec, 31, Mon, 12, 00, 00, "ja_JP.UTF-8", "%EY", + /* 30 昭和30年 */ + "\xe5\xb9\xb3\xe6\x88\x90""30\xe5\xb9\xb4" }, + { "Japanese era change, 2019, start of transition year", + 2019, Jan, 1, Tue, 12, 00, 00, "ja_JP.UTF-8", "%EY", + /* 30 昭和31年 */ + "\xe5\xb9\xb3\xe6\x88\x90""31\xe5\xb9\xb4" }, + + { "Japanese era change, 2019, before transition", + 2019, Apr, 30, Tue, 12, 00, 00, "ja_JP.UTF-8", "%EY", + /* 30 昭和31年 */ + "\xe5\xb9\xb3\xe6\x88\x90""31\xe5\xb9\xb4" }, + { "Japanese era change, 2019, after transition", + 2019, May, 1, Wed, 12, 00, 00, "ja_JP.UTF-8", "%EY", + /* 令和元年 */ + "\xe4\xbb\xa4\xe5\x92\x8c\xe5\x85\x83\xe5\xb9\xb4" }, + + { "Japanese era change, 2019, end of transition year", + 2019, Dec, 31, Tue, 12, 00, 00, "ja_JP.UTF-8", "%EY", + /* 令和元年 */ + "\xe4\xbb\xa4\xe5\x92\x8c\xe5\x85\x83\xe5\xb9\xb4" }, + { "Japanese era change, 2019, after transition year", + 2020, Jan, 1, Wed, 12, 00, 00, "ja_JP.UTF-8", "%EY", + /* 02 令和02年 */ + "\xe4\xbb\xa4\xe5\x92\x8c""02\xe5\xb9\xb4" }, + + + { "Japanese era change, 2019, before transition year", + 2018, Dec, 31, Mon, 12, 00, 00, "ja_JP.EUC-JP", "%EY", + /* 30 昭和30年 */ + "\xca\xbf\xc0\xae""30\xc7\xaf" }, + { "Japanese era change, 2019, start of transition year", + 2019, Jan, 1, Tue, 12, 00, 00, "ja_JP.EUC-JP", "%EY", + /* 30 昭和31年 */ + "\xca\xbf\xc0\xae""31\xc7\xaf" }, + + { "Japanese era change, 2019, before transition", + 2019, Apr, 30, Tue, 12, 00, 00, "ja_JP.EUC-JP", "%EY", + /* 30 昭和31年 */ + "\xca\xbf\xc0\xae""31\xc7\xaf" }, + { "Japanese era change, 2019, after transition", + 2019, May, 1, Wed, 12, 00, 00, "ja_JP.EUC-JP", "%EY", + /* 令和元年 */ + "\xce\xe1\xcf\xc2\xb8\xb5\xc7\xaf" }, + + { "Japanese era change, 2019, end of transition year", + 2019, Dec, 31, Tue, 12, 00, 00, "ja_JP.EUC-JP", "%EY", + /* 令和元年 */ + "\xce\xe1\xcf\xc2\xb8\xb5\xc7\xaf" }, + { "Japanese era change, 2019, after transition year", + 2020, Jan, 1, Wed, 12, 00, 00, "ja_JP.EUC-JP", "%EY", + /* 02 令和02年 */ + "\xce\xe1\xcf\xc2""02\xc7\xaf" }, }; #define NDATA array_length(data)