diff options
Diffstat (limited to 't/t4041-diff-submodule-option.sh')
-rwxr-xr-x | t/t4041-diff-submodule-option.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh index 0c1502d4b0..28f9d83d4c 100755 --- a/t/t4041-diff-submodule-option.sh +++ b/t/t4041-diff-submodule-option.sh @@ -14,12 +14,18 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh -# Tested non-UTF-8 encoding -test_encoding="ISO8859-1" +# 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 -# 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") add_file () { ( cd "$1" && |