diff options
author | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2022-09-15 18:56:20 +0900 |
---|---|---|
committer | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2022-09-15 18:56:20 +0900 |
commit | 4fc5dc0292acd77f17281f451774ba2ca4203026 (patch) | |
tree | 25f6306c5a417ae135102ec02a3d725e9c14a10f /Test/ztst.zsh | |
parent | eb738c793a6f9f293fc655c6aa87effc3dd9e44f (diff) | |
download | zsh-4fc5dc0292acd77f17281f451774ba2ca4203026.tar.gz zsh-4fc5dc0292acd77f17281f451774ba2ca4203026.zip |
50629: do not use egrep in tests
Diffstat (limited to 'Test/ztst.zsh')
-rwxr-xr-x | Test/ztst.zsh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Test/ztst.zsh b/Test/ztst.zsh index aca275c1c..d95b726e7 100755 --- a/Test/ztst.zsh +++ b/Test/ztst.zsh @@ -37,6 +37,21 @@ emulate -R zsh # LANG must be passed to child zsh. export LANG +# find UTF-8 locale +ZTST_find_UTF8 () { + 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 + ${(M)$(locale -a 2>/dev/null):#*.(utf8|UTF-8)}) + for LANG in $langs; do + if [[ é = ? ]]; then + echo $LANG + return + fi + done +} + # Don't propagate variables that are set by default in the shell. typeset +x WORDCHARS |