mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-09-21 19:31:50 +02:00
50662: unset LC_* for all the tests
This commit is contained in:
parent
1b421e4978
commit
1e4c7bcae5
@ -1,5 +1,7 @@
|
|||||||
2022-09-26 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
2022-09-26 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||||
|
|
||||||
|
* 50662: Test/ztst.zsh: unset LC_* for all the tests
|
||||||
|
|
||||||
* 50658 + test: Src/Modules/pcre.c, Test/V07pcre.ztst: Enable to
|
* 50658 + test: Src/Modules/pcre.c, Test/V07pcre.ztst: Enable to
|
||||||
switch between C/UTF-8 locales in PCRE
|
switch between C/UTF-8 locales in PCRE
|
||||||
|
|
||||||
|
@ -25,23 +25,13 @@
|
|||||||
# still not be good enough. Maybe we should trick it somehow.
|
# still not be good enough. Maybe we should trick it somehow.
|
||||||
emulate -R zsh
|
emulate -R zsh
|
||||||
|
|
||||||
# Ensure the locale does not screw up sorting. Don't supply a locale
|
# By default tests are run in C locale. LANG must be passed to child zsh.
|
||||||
# unless there's one set, to minimise problems.
|
unset -m LC_\*
|
||||||
[[ -n $LC_ALL ]] && LC_ALL=C
|
export LANG=C
|
||||||
[[ -n $LC_CTYPE ]] && LC_CTYPE=C
|
|
||||||
[[ -n $LC_COLLATE ]] && LC_COLLATE=C
|
|
||||||
[[ -n $LC_NUMERIC ]] && LC_NUMERIC=C
|
|
||||||
[[ -n $LC_MESSAGES ]] && LC_MESSAGES=C
|
|
||||||
[[ -n $LANG ]] && LANG=C
|
|
||||||
# Test file may (or may not) set LANG to other locales. In either case,
|
|
||||||
# LANG must be passed to child zsh.
|
|
||||||
export LANG
|
|
||||||
|
|
||||||
# find UTF-8 locale
|
# find UTF-8 locale
|
||||||
ZTST_find_UTF8 () {
|
ZTST_find_UTF8 () {
|
||||||
setopt multibyte
|
setopt multibyte
|
||||||
# Don't let LC_* override our choice of locale.
|
|
||||||
unset -m LC_\*
|
|
||||||
local langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8
|
local langs=(en_{US,GB}.{UTF-,utf}8 en.UTF-8
|
||||||
${(M)$(locale -a 2>/dev/null):#*.(utf8|UTF-8)})
|
${(M)$(locale -a 2>/dev/null):#*.(utf8|UTF-8)})
|
||||||
for LANG in $langs; do
|
for LANG in $langs; do
|
||||||
|
Loading…
Reference in New Issue
Block a user