summaryrefslogtreecommitdiff
path: root/t/t4059-diff-submodule-not-initialized.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t4059-diff-submodule-not-initialized.sh')
-rwxr-xr-xt/t4059-diff-submodule-not-initialized.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/t/t4059-diff-submodule-not-initialized.sh b/t/t4059-diff-submodule-not-initialized.sh
index d489230df8..0fe81056d5 100755
--- a/t/t4059-diff-submodule-not-initialized.sh
+++ b/t/t4059-diff-submodule-not-initialized.sh
@@ -11,12 +11,18 @@ initialized previously but the checkout has since been removed.
. ./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 () {
(