From: Lakshmi-Surekha <[email protected]>
On AIX, the zh_TW.big5 locale is not available, causing the following warnings
during the test suite execution:
< ./glob2.sub: line 44: warning: setlocale: LC_ALL: cannot change locale
(zh_TW.big5): No such file or directory
< ./glob2.sub: line 65: warning: setlocale: LC_ALL: cannot change locale
(zh_TW.big5): No such file or directory
In AIX, the locale we have is Zh_TW.big5 (case difference), not zh_TW.big5.
This patch addresses this locale issue,
thereby eliminating the warnings during the test execution.
---
tests/glob2.sub | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/tests/glob2.sub b/tests/glob2.sub
index 0e0482dc..d8064030 100644
--- a/tests/glob2.sub
+++ b/tests/glob2.sub
@@ -41,7 +41,11 @@ esac
[[ $var = $var ]] && echo ok 4
[[ $var = $'ab\134' ]] && echo ok 5
-LC_ALL=zh_TW.big5
+if [[ $(uname -s) == AIX ]]; then
+ LC_ALL=Zh_TW.big5
+else
+ LC_ALL=zh_TW.big5
+fi
read a b c <<< $'\u3b1 b c\n'
echo $b
@@ -62,4 +66,8 @@ printf "%s" "a${alpha}b" | LC_ALL=C od -b |
_intl_normalize_spaces
a=$'\u3b1'
[[ $a = $a ]] && echo ok 6
-LC_ALL=zh_TW.big5 ${THIS_SH} -c $'[[ \u3b1 = \u3b1 ]]' && echo ok 7
+if [[ $(uname -s) == AIX ]]; then
+ LC_ALL=Zh_TW.big5 ${THIS_SH} -c $'[[ \u3b1 = \u3b1 ]]' && echo ok 7
+else
+ LC_ALL=zh_TW.big5 ${THIS_SH} -c $'[[ \u3b1 = \u3b1 ]]' && echo ok 7
+fi
--
2.41.0