From: Bagas Sanjaya Date: Fri, 04 Jun 2021 03:32:04 GMT Subject: Re: [PATCH] t: use user-specific utf-8 locale for testing Message-ID: In-Reply-To: <20210602114646.17463-1-congdanhqx@gmail.com> Hi Đoàn, On 02/06/21 18.46, Đoàn Trần Công Danh wrote: > In some test-cases, utf-8 locale is required. To find such locale, > we're using the first available UTF-8 locale that returned by > "locale -a". > On most systems, the first available such locale is C.UTF-8, so why don't we just use it? > Despite being required by POSIX, locale(1) is unavailable in some > systems, e.g. Linux with musl libc. Some of those systems support > utf-8 locale out of the box. > > However, without "locale -a", we can't guess provided UTF-8 locale. > > Let's give users of those systems an option to have better test > coverage. > So can we assume to UTF-8 locale as default for testing on systems without locale(1)? > Signed-off-by: Đoàn Trần Công Danh > --- > Makefile | 6 ++++++ > t/lib-git-svn.sh | 15 +++++++++------ > t/t9100-git-svn-basic.sh | 14 +++----------- > t/t9115-git-svn-dcommit-funky-renames.sh | 6 +++--- > t/t9129-git-svn-i18n-commitencoding.sh | 4 ++-- > 5 files changed, 23 insertions(+), 22 deletions(-) > > diff --git a/Makefile b/Makefile > index c3565fc0f8..4b2c24e5ea 100644 > --- a/Makefile > +++ b/Makefile > @@ -398,6 +398,9 @@ all:: > # with a different indexfile format version. If it isn't set the index > # file format used is index-v[23]. > # > +# Define GIT_TEST_UTF8_LOCALE to prefered utf-8 locale for testing. > +# If it isn't set, use the first utf-8 locale returned by "locale -a". > +# Better say "... to prefer utf-8 locale for testing". -- An old man doll... just what I always wanted! - Clara