diff options
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | Test/Y07call_program.ztst | 21 |
2 files changed, 17 insertions, 9 deletions
@@ -1,3 +1,8 @@ +2026-09-01 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> + + * 55120: Test/Y07call_program.ztst: only check values of LC_ALL + etc. while testing option -l + 2026-09-01 Mikael Magnusson <mikachu@gmail.com> * Jun-ichi Takimoto: 55119: Doc/Zsh/grammar.yo: fix typo from diff --git a/Test/Y07call_program.ztst b/Test/Y07call_program.ztst index 19eca8f9f..afdb3bc69 100644 --- a/Test/Y07call_program.ztst +++ b/Test/Y07call_program.ztst @@ -71,20 +71,23 @@ if [[ -z ${lc::=${ ZTST_find_UTF8 }} ]]; then ZTST_skip='no utf8 locale' else - comptesteval "old_LC_ALL=\$LC_ALL; LC_ALL=${(q+)lc}" - for 1 in '' -l; do - tst_call_program $1 tag ' - local -a arr=( z e é ) - print -r - ${(o)arr} - ' - done + comptesteval "old_LC_ALL=\$LC_ALL; lc=$lc; LC_ALL=$lc" + # without -l: _comp_locale sets LC_CTYPE=$lc, LC_ALL=, LANG=C + tst_call_program tag ' + [[ $LC_CTYPE != $lc ]] && echo "bad LC_CTYPE (without -l)" + print -r - LANG=$LANG LC_ALL=$LC_ALL + ' + # with -l: locale doesn't change: LC_ALL=$lc + tst_call_program -l tag ' + [[ $LC_ALL != $lc ]] && echo "LC_ALL changed (with -l)" + ' comptesteval 'LC_ALL=$old_LC_ALL' fi 0:-l >line: {tst }{} ->MESSAGE:{e z é} +>MESSAGE:{LANG=C LC_ALL=} >line: {tst }{} ->MESSAGE:{e é z} +>MESSAGE:{} tst_call_program tag print a b c tst_call_program -p tag print a b c |
