aboutsummaryrefslogtreecommitdiff
path: root/t/t4060-diff-submodule-option-diff-format.sh
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2024-11-01 12:53:16 -0400
committerTaylor Blau <me@ttaylorr.com>2024-11-01 12:53:17 -0400
commit268fd2fe58e894a7a0c9736dc32e0c3a3c409cf8 (patch)
tree846b6737c4bf05eae4ff39e183c0ae88bb94cb1d /t/t4060-diff-submodule-option-diff-format.sh
parent47c3170a3e7acce768a6b3d5734da57a2cc6b54c (diff)
parentdd6003f200745ea3f42dc69c2b2901071ae7a726 (diff)
downloadgit-268fd2fe58e894a7a0c9736dc32e0c3a3c409cf8.tar.xz
Merge branch 'ps/platform-compat-fixes'
Various platform compatibility fixes split out of the larger effort to use Meson as the primary build tool. * ps/platform-compat-fixes: t6006: fix prereq handling with `test_format ()` http: fix build error on FreeBSD builtin/credential-cache: fix missing parameter for stub function t7300: work around platform-specific behaviour with long paths on MinGW t5500, t5601: skip tests which exercise paths with '[::1]' on Cygwin t3404: work around platform-specific behaviour on macOS 10.15 t1401: make invocation of tar(1) work with Win32-provided one t/lib-gpg: fix setup of GNUPGHOME in MinGW t/lib-gitweb: test against the build version of gitweb t/test-lib: wire up NO_ICONV prerequisite t/test-lib: fix quoting of TEST_RESULTS_SAN_FILE
Diffstat (limited to 't/t4060-diff-submodule-option-diff-format.sh')
-rwxr-xr-xt/t4060-diff-submodule-option-diff-format.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/t/t4060-diff-submodule-option-diff-format.sh b/t/t4060-diff-submodule-option-diff-format.sh
index 8ce67442d9..918334fa4c 100755
--- a/t/t4060-diff-submodule-option-diff-format.sh
+++ b/t/t4060-diff-submodule-option-diff-format.sh
@@ -13,12 +13,17 @@ This test tries to verify the sanity of --submodule=diff option of git diff.
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
-# Tested non-UTF-8 encoding
-test_encoding="ISO8859-1"
-
-# String "added" in German (translated with Google Translate), encoded in UTF-8,
-# used in sample commit log messages in add_file() function below.
-added=$(printf "hinzugef\303\274gt")
+# Test non-UTF-8 encoding in case iconv is available.
+if test_have_prereq ICONV
+then
+ test_encoding="ISO8859-1"
+ # String "added" in German (translated with Google Translate), encoded in UTF-8,
+ # used in sample commit log messages in add_file() function below.
+ added=$(printf "hinzugef\303\274gt")
+else
+ test_encoding="UTF-8"
+ added="added"
+fi
add_file () {
(