summaryrefslogtreecommitdiff
path: root/t/t9115-git-svn-dcommit-funky-renames.sh
diff options
context:
space:
mode:
authorĐoàn Trần Công Danh <congdanhqx@gmail.com>2021-06-08 06:56:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-06-08 07:07:37 (GMT)
commit482c962de4af32471a5ab770160731a028fcd9d6 (patch)
tree528c6dea32da508397e8d87b2c771aa15c40c3f6 /t/t9115-git-svn-dcommit-funky-renames.sh
parent48bf2fa8bad054d66bd79c6ba903c89c704201f7 (diff)
downloadgit-482c962de4af32471a5ab770160731a028fcd9d6.zip
git-482c962de4af32471a5ab770160731a028fcd9d6.tar.gz
git-482c962de4af32471a5ab770160731a028fcd9d6.tar.bz2
t: use user-specified utf-8 locale for testing svn
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". However, the locale(1) utility is unavailable on some systems, e.g. Linux with musl libc. However, without "locale -a", we can't guess provided UTF-8 locale. Add a Makefile knob GIT_TEST_UTF8_LOCALE and activate it for linux-musl in our CI system. Rename t/lib-git-svn.sh:prepare_a_utf8_locale to prepare_utf8_locale, since we no longer prepare the variable named "a_utf8_locale", but set up a fallback value for GIT_TEST_UTF8_LOCALE instead. The fallback will be LC_ALL, LANG environment variable, or the first UTF-8 locale from output of "locale -a", in that order. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9115-git-svn-dcommit-funky-renames.sh')
-rwxr-xr-xt/t9115-git-svn-dcommit-funky-renames.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t9115-git-svn-dcommit-funky-renames.sh b/t/t9115-git-svn-dcommit-funky-renames.sh
index 9b44a44..743fbe1 100755
--- a/t/t9115-git-svn-dcommit-funky-renames.sh
+++ b/t/t9115-git-svn-dcommit-funky-renames.sh
@@ -93,9 +93,9 @@ test_expect_success 'git svn rebase works inside a fresh-cloned repository' '
# > ... All of the above characters, except for the backslash, are converted
# > to special UNICODE characters in the range 0xf000 to 0xf0ff (the
# > "Private use area") when creating or accessing files.
-prepare_a_utf8_locale
+prepare_utf8_locale
test_expect_success UTF8,!MINGW,!UTF8_NFD_TO_NFC 'svn.pathnameencoding=cp932 new file on dcommit' '
- LC_ALL=$a_utf8_locale &&
+ LC_ALL=$GIT_TEST_UTF8_LOCALE &&
export LC_ALL &&
neq=$(printf "\201\202") &&
git config svn.pathnameencoding cp932 &&
@@ -107,7 +107,7 @@ test_expect_success UTF8,!MINGW,!UTF8_NFD_TO_NFC 'svn.pathnameencoding=cp932 new
# See the comment on the above test for setting of LC_ALL.
test_expect_success !MINGW,!UTF8_NFD_TO_NFC 'svn.pathnameencoding=cp932 rename on dcommit' '
- LC_ALL=$a_utf8_locale &&
+ LC_ALL=$GIT_TEST_UTF8_LOCALE &&
export LC_ALL &&
inf=$(printf "\201\207") &&
git config svn.pathnameencoding cp932 &&