t4041, t4205, t6006, t7102: don't hardcode tested encoding value
The tested encoding is always available in a variable. Use it instead of hardcoding. Also, to be in line with other tests use ISO8859-1 (uppercase) rather then iso8859-1. Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
496a69802b
commit
ee3efaf66c
@ -11,6 +11,9 @@ This test tries to verify the sanity of the --submodule option of git diff.
|
||||
|
||||
. ./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")
|
||||
@ -23,8 +26,8 @@ add_file () {
|
||||
echo "$name" >"$name" &&
|
||||
git add "$name" &&
|
||||
test_tick &&
|
||||
msg_added_iso88591=$(echo "Add $name ($added $name)" | iconv -f utf-8 -t iso8859-1) &&
|
||||
git -c 'i18n.commitEncoding=iso8859-1' commit -m "$msg_added_iso88591"
|
||||
msg_added_iso88591=$(echo "Add $name ($added $name)" | iconv -f utf-8 -t $test_encoding) &&
|
||||
git -c "i18n.commitEncoding=$test_encoding" commit -m "$msg_added_iso88591"
|
||||
done >/dev/null &&
|
||||
git rev-parse --short --verify HEAD
|
||||
)
|
||||
|
Reference in New Issue
Block a user