mirror of
https://github.com/git/git.git
synced 2026-01-19 15:09:01 +00:00
t9350: skip ISO-8859-1 test when the environment is always-UTF-8
In the BusyBox-w32 version that is currently under consideration for MinGit for Windows (to reduce the .zip size, and to avoid problems with the MSYS2 runtime), the UTF-16 environment present in Windows is considered to be authoritative, and the 8-bit version is always in UTF-8 encoding. As a consequence, the ISO-8859-1 test in t9350-fast-export (which tries to set GIT_AUTHOR_NAME to a ISO-8859-1 encoded value) *must* fail in that setup. So let's detect when it would fail (due to an environment being purely kept UTF-8 encoded), and skip that test in that case. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -66,7 +66,12 @@ test_expect_success 'fast-export master~2..master' '
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'iso-8859-1' '
|
||||
test_lazy_prereq UTF8_ONLY_ENV '
|
||||
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
|
||||
! git var GIT_AUTHOR_IDENT | grep "Áéí"
|
||||
'
|
||||
|
||||
test_expect_success !UTF8_ONLY_ENV 'iso-8859-1' '
|
||||
|
||||
git config i18n.commitencoding ISO8859-1 &&
|
||||
# use author and committer name in ISO-8859-1 to match it.
|
||||
@@ -82,6 +87,11 @@ test_expect_success 'iso-8859-1' '
|
||||
grep "Áéí óú" actual)
|
||||
|
||||
'
|
||||
|
||||
# The subsequent tests validate timestamps, and we may just have skipped a tick
|
||||
test_have_prereq !UTF8_ONLY_ENV ||
|
||||
test_tick
|
||||
|
||||
test_expect_success 'import/export-marks' '
|
||||
|
||||
git checkout -b marks master &&
|
||||
@@ -196,7 +206,7 @@ GIT_COMMITTER_NAME='C O Mitter'; export GIT_COMMITTER_NAME
|
||||
|
||||
test_expect_success 'setup copies' '
|
||||
|
||||
git config --unset i18n.commitencoding &&
|
||||
{ git config --unset i18n.commitencoding || :; } &&
|
||||
git checkout -b copy rein &&
|
||||
git mv file file3 &&
|
||||
git commit -m move1 &&
|
||||
|
||||
Reference in New Issue
Block a user