Skip to content

Commit f7dc6a9

Browse files
jiangxingitster
authored andcommitted
Fix tests under GETTEXT_POISON on git-remote
Use the i18n-specific test functions in test scripts for git-remote. This issue was was introduced in v1.7.10-233-gbb16d5: bb16d5 i18n: remote: mark strings for translation and been broken under GETTEXT_POISON=YesPlease since. Signed-off-by: Jiang Xin <[email protected]> Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9aa98ef commit f7dc6a9

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

t/t5505-remote.sh

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ test_expect_success setup '
5252
5353
'
5454

55-
test_expect_success 'remote information for the origin' '
55+
test_expect_success C_LOCALE_OUTPUT 'remote information for the origin' '
5656
(
5757
cd test &&
5858
tokens_match origin "$(git remote)" &&
@@ -66,8 +66,6 @@ test_expect_success 'add another remote' '
6666
cd test &&
6767
git remote add -f second ../two &&
6868
tokens_match "origin second" "$(git remote)" &&
69-
check_remote_track origin master side &&
70-
check_remote_track second master side another &&
7169
check_tracking_branch second master side another &&
7270
git for-each-ref "--format=%(refname)" refs/remotes |
7371
sed -e "/^refs\/remotes\/origin\//d" \
@@ -77,6 +75,14 @@ test_expect_success 'add another remote' '
7775
)
7876
'
7977

78+
test_expect_success C_LOCALE_OUTPUT 'check remote tracking' '
79+
(
80+
cd test &&
81+
check_remote_track origin master side &&
82+
check_remote_track second master side another
83+
)
84+
'
85+
8086
test_expect_success 'remote forces tracking branches' '
8187
(
8288
cd test &&
@@ -95,7 +101,7 @@ test_expect_success 'remove remote' '
95101
)
96102
'
97103

98-
test_expect_success 'remove remote' '
104+
test_expect_success C_LOCALE_OUTPUT 'remove remote' '
99105
(
100106
cd test &&
101107
tokens_match origin "$(git remote)" &&
@@ -131,8 +137,8 @@ EOF
131137
git remote rm oops 2>actual2 &&
132138
git branch -d foobranch &&
133139
git tag -d footag &&
134-
test_cmp expect1 actual1 &&
135-
test_cmp expect2 actual2
140+
test_i18ncmp expect1 actual1 &&
141+
test_i18ncmp expect2 actual2
136142
)
137143
'
138144

@@ -192,7 +198,7 @@ test_expect_success 'show' '
192198
git config --add remote.two.push refs/heads/master:refs/heads/another &&
193199
git remote show origin two > output &&
194200
git branch -d rebase octopus &&
195-
test_cmp expect output)
201+
test_i18ncmp expect output)
196202
'
197203

198204
cat > test/expect << EOF
@@ -217,7 +223,7 @@ test_expect_success 'show -n' '
217223
cd test &&
218224
git remote show -n origin > output &&
219225
mv ../one.unreachable ../one &&
220-
test_cmp expect output)
226+
test_i18ncmp expect output)
221227
'
222228

223229
test_expect_success 'prune' '
@@ -255,7 +261,7 @@ EOF
255261
test_expect_success 'set-head --auto fails w/multiple HEADs' '
256262
(cd test &&
257263
test_must_fail git remote set-head --auto two >output 2>&1 &&
258-
test_cmp expect output)
264+
test_i18ncmp expect output)
259265
'
260266

261267
cat >test/expect <<EOF
@@ -285,7 +291,7 @@ test_expect_success 'prune --dry-run' '
285291
test_must_fail git rev-parse refs/remotes/origin/side &&
286292
(cd ../one &&
287293
git branch -m side side2) &&
288-
test_cmp expect output)
294+
test_i18ncmp expect output)
289295
'
290296

291297
test_expect_success 'add --mirror && prune' '
@@ -705,7 +711,7 @@ test_expect_success 'remote prune to cause a dangling symref' '
705711
cd seven &&
706712
git remote prune origin
707713
) >err 2>&1 &&
708-
grep "has become dangling" err &&
714+
test_i18ngrep "has become dangling" err &&
709715
710716
: And the dangling symref will not cause other annoying errors &&
711717
(

0 commit comments

Comments
 (0)