On Fri, Nov 7, 2014 at 12:12 PM, Jim Meyering <j...@meyering.net> wrote:
> On Fri, Nov 7, 2014 at 4:20 AM, Norihiro Tanaka <nori...@kcn.ne.jp> wrote:
>> Shift_JIS locale is installed in my machine, but sjis-mb test module
>> recognizes it, as it is defined as ja_JP.SJIS.
>>
>> Further more, on Solaris it is defined as ja_JP.PCK.
>
> Thank you, I will revisit this diff after the upcoming release.

Sorry about the delay.
I've made small modifications and pushed the attached in your name:
From 1616111f67ca533140878b9693d3a3e1e39ad1f9 Mon Sep 17 00:00:00 2001
From: Norihiro Tanaka <nori...@kcn.ne.jp>
Date: Sat, 18 Jul 2015 22:27:56 -0700
Subject: [PATCH] tests: sjis-mb: accept two more locales

* tests/sjis-mb: Accept the ja_JP.SJIS and ja_JP.PCK locales
as well as ja_JP.SHIFT_JIS, so this test is less likely to
be skipped unnecessarily.  Reported as http://bugs.gnu.org/18983
---
 tests/sjis-mb | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/sjis-mb b/tests/sjis-mb
index 63f0ad9..39459fe 100755
--- a/tests/sjis-mb
+++ b/tests/sjis-mb
@@ -11,8 +11,6 @@ path_prepend_ .
 require_compiled_in_MB_support
 require_timeout_

-locale=ja_JP.SHIFT_JIS
-
 # Sequences used in this test ("%" and "@" become 8-bit characters, while "A"
 # is the real ASCII character for "A"):
 # - "%" becomes an half-width katakana in SJIS, but it is an invalid sequence
@@ -23,6 +21,11 @@ locale=ja_JP.SHIFT_JIS

 encode() { echo "$1" | tr @% '\203\301'; }

+for locale in ja_JP.SHIFT_JIS ja_JP.SJIS ja_JP.PCK ''; do
+  test "$(get-mb-cur-max $locale)" = 2 && break
+done
+test -n "$locale" || skip_ 'SJIS locale not found'
+
 k=0
 test_grep_reject() {
   k=$(expr $k + 1)
@@ -40,8 +43,6 @@ test_grep() {
   test $? = 0 && compare exp$k out$k
 }

-test "$(get-mb-cur-max $locale)" = 2 || skip_ 'SJIS locale not found'
-
 failure_tests=@A
 successful_tests='%%AA @AA @A@@A'

-- 
2.3.7

Reply via email to