Skip to content

Commit 499f4f6

Browse files
committed
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 <[email protected]>
1 parent 98106a5 commit 499f4f6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

t/t9350-fast-export.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ test_expect_success 'fast-export --show-original-ids | git fast-import' '
9494
test $MUSS = $(git rev-parse --verify refs/tags/muss)
9595
'
9696

97+
test_lazy_prereq UTF8_ONLY_ENV '
98+
. "$TEST_DIRECTORY"/t3901/8859-1.txt &&
99+
! git var GIT_AUTHOR_IDENT | grep "Áéí"
100+
'
101+
97102
test_expect_success 'reencoding iso-8859-7' '
98103
99104
test_when_finished "git reset --hard HEAD~1" &&
@@ -168,6 +173,10 @@ test_expect_success 'encoding preserved if reencoding fails' '
168173
test 252 -eq "$(git cat-file -s i18n-invalid)")
169174
'
170175

176+
# The subsequent tests validate timestamps, and we may just have skipped a tick
177+
test_have_prereq !UTF8_ONLY_ENV ||
178+
test_tick
179+
171180
test_expect_success 'import/export-marks' '
172181
173182
git checkout -b marks master &&

0 commit comments

Comments
 (0)