[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tests/glob2.sub failure on macOS 14
From: |
Grisha Levit |
Subject: |
tests/glob2.sub failure on macOS 14 |
Date: |
Fri, 24 Nov 2023 19:43:04 -0500 |
In macOS 14 (Sonoma), Apple switched from GNU to BSD-based iconv, which
have slightly different charset definitions. The tests in glob2.sub test
U+03B1 in zh_HK.big5hkscs, but this codepoint is not present in the BSD
BIG5-HKSCS definition, so the test fails.
The codepoint does exist in the BIG5 charset in both GNU and BSD versions
(with the encoding that the test expects) so I think changing this test
from zh_HK.big5hkscs to zh_TW.big5 would make it work as intended on both
system types.
---
diff --git a/tests/glob2.sub b/tests/glob2.sub
index 09cb6d51..7425ea4a 100644
--- a/tests/glob2.sub
+++ b/tests/glob2.sub
@@ -14,10 +14,10 @@
. ./test-glue-functions
# this locale causes problems all over the place
-if locale -a | grep -i '^zh_HK\.big5hkscs' >/dev/null ; then
+if locale -a | grep -i '^zh_TW\.big5' >/dev/null ; then
:
else
- echo "glob2.sub: warning: you do not have the zh_HK.big5hkscs
locale installed;" >&2
+ echo "glob2.sub: warning: you do not have the zh_TW.big5
locale installed;" >&2
echo "glob2.sub: warning: that will cause some of these tests
to fail." >&2
fi
@@ -41,7 +41,7 @@ esac
[[ $var = $var ]] && echo ok 4
[[ $var = $'ab\134' ]] && echo ok 5
-LC_ALL=zh_HK.big5hkscs
+LC_ALL=zh_TW.big5
read a b c <<< $'\u3b1 b c\n'
echo $b
@@ -62,4 +62,4 @@ printf "%s" "a${alpha}b" | LC_ALL=C od -b |
_intl_normalize_spaces
a=$'\u3b1'
[[ $a = $a ]] && echo ok 6
-LC_ALL=zh_HK.big5hkscs ${THIS_SH} -c $'[[ \u3b1 = \u3b1 ]]' && echo ok 7
+LC_ALL=zh_TW.big5 ${THIS_SH} -c $'[[ \u3b1 = \u3b1 ]]' && echo ok 7
- tests/glob2.sub failure on macOS 14,
Grisha Levit <=