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>
Brandon Casey committed
May 18, 2009 at 18:44 UTC
1e6bca0e8941f3a73d16d1842e2202f85b446c41
1 file changed
+20
-20
t/t3901-i18n-patch.sh
+20
-20
@@ -17,9 +17,9 @@ check_encoding () {
17
git cat-file commit HEAD~$j |
18
case "$header" in
19
8859)
20
- grep "^encoding ISO-8859-1" ;;
20
+ grep "^encoding ISO8859-1" ;;
21
*)
22
- grep "^encoding ISO-8859-1"; test "$?" != 0 ;;
22
+ grep "^encoding ISO8859-1"; test "$?" != 0 ;;
23
esac || {
24
bad=1
25
break
@@ -55,7 +55,7 @@ test_expect_success setup '
55
git commit -s -m "Second on side" &&
56
57
# the second one on the side branch is ISO-8859-1
58
- git config i18n.commitencoding ISO-8859-1 &&
58
+ git config i18n.commitencoding ISO8859-1 &&
59
# use author and committer name in ISO-8859-1 to match it.
60
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
61
test_tick &&
@@ -68,14 +68,14 @@ test_expect_success setup '
68
'
69
70
test_expect_success 'format-patch output (ISO-8859-1)' '
71
- git config i18n.logoutputencoding ISO-8859-1 &&
71
+ git config i18n.logoutputencoding ISO8859-1 &&
72
73
git format-patch --stdout master..HEAD^ >out-l1 &&
74
git format-patch --stdout HEAD^ >out-l2 &&
75
- grep "^Content-Type: text/plain; charset=ISO-8859-1" out-l1 &&
76
- grep "^From: =?ISO-8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l1 &&
77
- grep "^Content-Type: text/plain; charset=ISO-8859-1" out-l2 &&
78
- grep "^From: =?ISO-8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l2
75
+ grep "^Content-Type: text/plain; charset=ISO8859-1" out-l1 &&
76
+ grep "^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l1 &&
77
+ grep "^Content-Type: text/plain; charset=ISO8859-1" out-l2 &&
78
+ grep "^From: =?ISO8859-1?q?=C1=E9=ED=20=F3=FA?=" out-l2
79
'
80
81
test_expect_success 'format-patch output (UTF-8)' '
@@ -110,7 +110,7 @@ test_expect_success 'rebase (U/U)' '
110
111
test_expect_success 'rebase (U/L)' '
112
git config i18n.commitencoding UTF-8 &&
113
- git config i18n.logoutputencoding ISO-8859-1 &&
113
+ git config i18n.logoutputencoding ISO8859-1 &&
114
. "$TEST_DIRECTORY"/t3901-utf8.txt &&
115
116
git reset --hard side &&
@@ -121,8 +121,8 @@ test_expect_success 'rebase (U/L)' '
121
122
test_expect_success 'rebase (L/L)' '
123
# In this test we want ISO-8859-1 encoded commits as the result
124
- git config i18n.commitencoding ISO-8859-1 &&
125
- git config i18n.logoutputencoding ISO-8859-1 &&
124
+ git config i18n.commitencoding ISO8859-1 &&
125
+ git config i18n.logoutputencoding ISO8859-1 &&
126
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
127
128
git reset --hard side &&
@@ -134,7 +134,7 @@ test_expect_success 'rebase (L/L)' '
134
test_expect_success 'rebase (L/U)' '
135
# This is pathological -- use UTF-8 as intermediate form
136
# to get ISO-8859-1 results.
137
- git config i18n.commitencoding ISO-8859-1 &&
137
+ git config i18n.commitencoding ISO8859-1 &&
138
git config i18n.logoutputencoding UTF-8 &&
139
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
140
@@ -162,8 +162,8 @@ test_expect_success 'cherry-pick(U/U)' '
162
test_expect_success 'cherry-pick(L/L)' '
163
# Both the commitencoding and logoutputencoding is set to ISO-8859-1
164
165
- git config i18n.commitencoding ISO-8859-1 &&
166
- git config i18n.logoutputencoding ISO-8859-1 &&
165
+ git config i18n.commitencoding ISO8859-1 &&
166
+ git config i18n.logoutputencoding ISO8859-1 &&
167
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
168
169
git reset --hard master &&
@@ -178,7 +178,7 @@ test_expect_success 'cherry-pick(U/L)' '
178
# Commitencoding is set to UTF-8 but logoutputencoding is ISO-8859-1
179
180
git config i18n.commitencoding UTF-8 &&
181
- git config i18n.logoutputencoding ISO-8859-1 &&
181
+ git config i18n.logoutputencoding ISO8859-1 &&
182
. "$TEST_DIRECTORY"/t3901-utf8.txt &&
183
184
git reset --hard master &&
@@ -193,7 +193,7 @@ test_expect_success 'cherry-pick(L/U)' '
193
# Again, the commitencoding is set to ISO-8859-1 but
194
# logoutputencoding is set to UTF-8.
195
196
- git config i18n.commitencoding ISO-8859-1 &&
196
+ git config i18n.commitencoding ISO8859-1 &&
197
git config i18n.logoutputencoding UTF-8 &&
198
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
199
@@ -218,7 +218,7 @@ test_expect_success 'rebase --merge (U/U)' '
218
219
test_expect_success 'rebase --merge (U/L)' '
220
git config i18n.commitencoding UTF-8 &&
221
- git config i18n.logoutputencoding ISO-8859-1 &&
221
+ git config i18n.logoutputencoding ISO8859-1 &&
222
. "$TEST_DIRECTORY"/t3901-utf8.txt &&
223
224
git reset --hard side &&
@@ -229,8 +229,8 @@ test_expect_success 'rebase --merge (U/L)' '
229
230
test_expect_success 'rebase --merge (L/L)' '
231
# In this test we want ISO-8859-1 encoded commits as the result
232
- git config i18n.commitencoding ISO-8859-1 &&
233
- git config i18n.logoutputencoding ISO-8859-1 &&
232
+ git config i18n.commitencoding ISO8859-1 &&
233
+ git config i18n.logoutputencoding ISO8859-1 &&
234
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
235
236
git reset --hard side &&
@@ -242,7 +242,7 @@ test_expect_success 'rebase --merge (L/L)' '
242
test_expect_success 'rebase --merge (L/U)' '
243
# This is pathological -- use UTF-8 as intermediate form
244
# to get ISO-8859-1 results.
245
- git config i18n.commitencoding ISO-8859-1 &&
245
+ git config i18n.commitencoding ISO8859-1 &&
246
git config i18n.logoutputencoding UTF-8 &&
247
. "$TEST_DIRECTORY"/t3901-8859-1.txt &&
248