t3901: Use ISO8859-1 instead of ISO-8859-1 for backward compatibility

Some ancient platforms do not have an extensive list of alternate names for
character encodings.  For example, Solaris 7 does not know that ISO-8859-1
is the same as ISO8859-1.  Modern platforms do know this, so use the older
name.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Brandon Casey 2009-05-18 18:44:43 -05:00 committed by Junio C Hamano
parent d4ea4e2746
commit 1e6bca0e89

View File

@ -17,9 +17,9 @@ check_encoding () {
git cat-file commit HEAD~$j |
case "$header" in
8859)
grep "^encoding ISO-8859-1" ;;
grep "^encoding ISO8859-1" ;;
*)
grep "^encoding ISO-8859-1"; test "$?" != 0 ;;
grep "^encoding ISO8859-1"; test "$?" != 0 ;;
esac || {
bad=1
break
@ -55,7 +55,7 @@ test_expect_success setup '
git commit -s -m "Second on side" &&
# the second one on the side branch is ISO-8859-1
git config i18n.commitencoding ISO-8859-1 &&
git config i18n.commitencoding ISO8859-1 &&
# use author and committer name in ISO-8859-1 to match it.
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
test_tick &&
@ -68,14 +68,14 @@ test_expect_success setup '
'
test_expect_success 'format-patch output (ISO-8859-1)' '
git config i18n.logoutputencoding ISO-8859-1 &&
git config i18n.logoutputencoding ISO8859-1 &&
git format-patch --stdout master..HEAD^ >out-l1 &&
git format-patch --stdout HEAD^ >out-l2 &&
grep "^Content-Type: text/plain; charset=ISO-8859-1" out-l1 &&
grep "^From: =?ISO-8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l1 &&
grep "^Content-Type: text/plain; charset=ISO-8859-1" out-l2 &&
grep "^From: =?ISO-8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l2
grep "^Content-Type: text/plain; charset=ISO8859-1" out-l1 &&
grep "^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l1 &&
grep "^Content-Type: text/plain; charset=ISO8859-1" out-l2 &&
grep "^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l2
'
test_expect_success 'format-patch output (UTF-8)' '
@ -110,7 +110,7 @@ test_expect_success 'rebase (U/U)' '
test_expect_success 'rebase (U/L)' '
git config i18n.commitencoding UTF-8 &&
git config i18n.logoutputencoding ISO-8859-1 &&
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901-utf8.txt &&
git reset --hard side &&
@ -121,8 +121,8 @@ test_expect_success 'rebase (U/L)' '
test_expect_success 'rebase (L/L)' '
# In this test we want ISO-8859-1 encoded commits as the result
git config i18n.commitencoding ISO-8859-1 &&
git config i18n.logoutputencoding ISO-8859-1 &&
git config i18n.commitencoding ISO8859-1 &&
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
git reset --hard side &&
@ -134,7 +134,7 @@ test_expect_success 'rebase (L/L)' '
test_expect_success 'rebase (L/U)' '
# This is pathological -- use UTF-8 as intermediate form
# to get ISO-8859-1 results.
git config i18n.commitencoding ISO-8859-1 &&
git config i18n.commitencoding ISO8859-1 &&
git config i18n.logoutputencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
@ -162,8 +162,8 @@ test_expect_success 'cherry-pick(U/U)' '
test_expect_success 'cherry-pick(L/L)' '
# Both the commitencoding and logoutputencoding is set to ISO-8859-1
git config i18n.commitencoding ISO-8859-1 &&
git config i18n.logoutputencoding ISO-8859-1 &&
git config i18n.commitencoding ISO8859-1 &&
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
git reset --hard master &&
@ -178,7 +178,7 @@ test_expect_success 'cherry-pick(U/L)' '
# Commitencoding is set to UTF-8 but logoutputencoding is ISO-8859-1
git config i18n.commitencoding UTF-8 &&
git config i18n.logoutputencoding ISO-8859-1 &&
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901-utf8.txt &&
git reset --hard master &&
@ -193,7 +193,7 @@ test_expect_success 'cherry-pick(L/U)' '
# Again, the commitencoding is set to ISO-8859-1 but
# logoutputencoding is set to UTF-8.
git config i18n.commitencoding ISO-8859-1 &&
git config i18n.commitencoding ISO8859-1 &&
git config i18n.logoutputencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
@ -218,7 +218,7 @@ test_expect_success 'rebase --merge (U/U)' '
test_expect_success 'rebase --merge (U/L)' '
git config i18n.commitencoding UTF-8 &&
git config i18n.logoutputencoding ISO-8859-1 &&
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901-utf8.txt &&
git reset --hard side &&
@ -229,8 +229,8 @@ test_expect_success 'rebase --merge (U/L)' '
test_expect_success 'rebase --merge (L/L)' '
# In this test we want ISO-8859-1 encoded commits as the result
git config i18n.commitencoding ISO-8859-1 &&
git config i18n.logoutputencoding ISO-8859-1 &&
git config i18n.commitencoding ISO8859-1 &&
git config i18n.logoutputencoding ISO8859-1 &&
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
git reset --hard side &&
@ -242,7 +242,7 @@ test_expect_success 'rebase --merge (L/L)' '
test_expect_success 'rebase --merge (L/U)' '
# This is pathological -- use UTF-8 as intermediate form
# to get ISO-8859-1 results.
git config i18n.commitencoding ISO-8859-1 &&
git config i18n.commitencoding ISO8859-1 &&
git config i18n.logoutputencoding UTF-8 &&
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&