MinGW: disable legacy encoding tests
On Windows, all native APIs are Unicode-based. It is impossible to pass legacy encoded byte arrays to a process via command line or environment variables. Disable the tests that try to do so. In t3901, most tests still work if we don't mess up the repository encoding in setup, so don't switch to ISO-8859-1 on MinGW. Note that i18n tests that do their encoding tricks via encoded files (such as t3900) are not affected by this. Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Stepan Kasal <kasal@ucw.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Karsten Blees committed
Jul 17, 2014 at 17:37 UTC
32f4cb6cee9295fe68211581fec22c546808b436
3 files changed
+18
-15
t/t3901-i18n-patch.sh
+11
-8
@@ -54,10 +54,13 @@ test_expect_success setup '
54
git add yours &&
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 ISO8859-1 &&
59
- # use author and committer name in ISO-8859-1 to match it.
60
- . "$TEST_DIRECTORY"/t3901-8859-1.txt &&
57
+ if test_have_prereq NOT_MINGW
58
+ then
59
+ # the second one on the side branch is ISO-8859-1
60
+ git config i18n.commitencoding ISO8859-1 &&
61
+ # use author and committer name in ISO-8859-1 to match it.
62
+ . "$TEST_DIRECTORY"/t3901-8859-1.txt
63
+ fi &&
64
test_tick &&
65
echo Yet another >theirs &&
66
git add theirs &&
@@ -119,7 +122,7 @@ test_expect_success 'rebase (U/L)' '
122
check_encoding 2
123
'
124
122
-test_expect_success 'rebase (L/L)' '
125
+test_expect_success NOT_MINGW 'rebase (L/L)' '
126
# In this test we want ISO-8859-1 encoded commits as the result
127
git config i18n.commitencoding ISO8859-1 &&
128
git config i18n.logoutputencoding ISO8859-1 &&
@@ -131,7 +134,7 @@ test_expect_success 'rebase (L/L)' '
134
check_encoding 2 8859
135
'
136
134
-test_expect_success 'rebase (L/U)' '
137
+test_expect_success NOT_MINGW 'rebase (L/U)' '
138
# This is pathological -- use UTF-8 as intermediate form
139
# to get ISO-8859-1 results.
140
git config i18n.commitencoding ISO8859-1 &&
@@ -159,7 +162,7 @@ test_expect_success 'cherry-pick(U/U)' '
162
check_encoding 3
163
'
164
162
-test_expect_success 'cherry-pick(L/L)' '
165
+test_expect_success NOT_MINGW 'cherry-pick(L/L)' '
166
# Both the commitencoding and logoutputencoding is set to ISO-8859-1
167
168
git config i18n.commitencoding ISO8859-1 &&
@@ -189,7 +192,7 @@ test_expect_success 'cherry-pick(U/L)' '
192
check_encoding 3
193
'
194
192
-test_expect_success 'cherry-pick(L/U)' '
195
+test_expect_success NOT_MINGW 'cherry-pick(L/U)' '
196
# Again, the commitencoding is set to ISO-8859-1 but
197
# logoutputencoding is set to UTF-8.
198
t/t4201-shortlog.sh
+3
-3
@@ -93,7 +93,7 @@ test_expect_success 'output from user-defined format is re-wrapped' '
93
test_cmp expect log.predictable
94
'
95
96
-test_expect_success 'shortlog wrapping' '
96
+test_expect_success NOT_MINGW 'shortlog wrapping' '
97
cat >expect <<\EOF &&
98
A U Thor (5):
99
Test
@@ -114,7 +114,7 @@ EOF
114
test_cmp expect out
115
'
116
117
-test_expect_success 'shortlog from non-git directory' '
117
+test_expect_success NOT_MINGW 'shortlog from non-git directory' '
118
git log HEAD >log &&
119
GIT_DIR=non-existing git shortlog -w <log >out &&
120
test_cmp expect out
@@ -159,7 +159,7 @@ $DSCHO (2):
159
160
EOF
161
162
-test_expect_success 'shortlog encoding' '
162
+test_expect_success NOT_MINGW 'shortlog encoding' '
163
git reset --hard "$commit" &&
164
git config --unset i18n.commitencoding &&
165
echo 2 > a1 &&
t/t8005-blame-i18n.sh
+4
-4
@@ -33,7 +33,7 @@ author $SJIS_NAME
33
summary $SJIS_MSG
34
EOF
35
36
-test_expect_success \
36
+test_expect_success NOT_MINGW \
37
'blame respects i18n.commitencoding' '
38
git blame --incremental file | \
39
egrep "^(author|summary) " > actual &&
@@ -49,7 +49,7 @@ author $EUC_JAPAN_NAME
49
summary $EUC_JAPAN_MSG
50
EOF
51
52
-test_expect_success \
52
+test_expect_success NOT_MINGW \
53
'blame respects i18n.logoutputencoding' '
54
git config i18n.logoutputencoding eucJP &&
55
git blame --incremental file | \
@@ -66,7 +66,7 @@ author $UTF8_NAME
66
summary $UTF8_MSG
67
EOF
68
69
-test_expect_success \
69
+test_expect_success NOT_MINGW \
70
'blame respects --encoding=UTF-8' '
71
git blame --incremental --encoding=UTF-8 file | \
72
egrep "^(author|summary) " > actual &&
@@ -82,7 +82,7 @@ author $UTF8_NAME
82
summary $UTF8_MSG
83
EOF
84
85
-test_expect_success \
85
+test_expect_success NOT_MINGW \
86
'blame respects --encoding=none' '
87
git blame --incremental --encoding=none file | \
88
egrep "^(author|summary) " > actual &&