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 <worldhello.net@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jiang Xin committed
Aug 27, 2012 at 13:36 UTC
f7dc6a96435e050afbbdbdeffac481fea7ddb8af
1 file changed
+17
-11
t/t5505-remote.sh
+17
-11
@@ -52,7 +52,7 @@ test_expect_success setup '
52
53
'
54
55
-test_expect_success 'remote information for the origin' '
55
+test_expect_success C_LOCALE_OUTPUT 'remote information for the origin' '
56
(
57
cd test &&
58
tokens_match origin "$(git remote)" &&
@@ -66,8 +66,6 @@ test_expect_success 'add another remote' '
66
cd test &&
67
git remote add -f second ../two &&
68
tokens_match "origin second" "$(git remote)" &&
69
- check_remote_track origin master side &&
70
- check_remote_track second master side another &&
69
check_tracking_branch second master side another &&
70
git for-each-ref "--format=%(refname)" refs/remotes |
71
sed -e "/^refs\/remotes\/origin\//d" \
@@ -77,6 +75,14 @@ test_expect_success 'add another remote' '
75
)
76
'
77
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
+
86
test_expect_success 'remote forces tracking branches' '
87
(
88
cd test &&
@@ -95,7 +101,7 @@ test_expect_success 'remove remote' '
101
)
102
'
103
98
-test_expect_success 'remove remote' '
104
+test_expect_success C_LOCALE_OUTPUT 'remove remote' '
105
(
106
cd test &&
107
tokens_match origin "$(git remote)" &&
@@ -131,8 +137,8 @@ EOF
137
git remote rm oops 2>actual2 &&
138
git branch -d foobranch &&
139
git tag -d footag &&
134
- test_cmp expect1 actual1 &&
135
- test_cmp expect2 actual2
140
+ test_i18ncmp expect1 actual1 &&
141
+ test_i18ncmp expect2 actual2
142
)
143
'
144
@@ -192,7 +198,7 @@ test_expect_success 'show' '
198
git config --add remote.two.push refs/heads/master:refs/heads/another &&
199
git remote show origin two > output &&
200
git branch -d rebase octopus &&
195
- test_cmp expect output)
201
+ test_i18ncmp expect output)
202
'
203
204
cat > test/expect << EOF
@@ -217,7 +223,7 @@ test_expect_success 'show -n' '
223
cd test &&
224
git remote show -n origin > output &&
225
mv ../one.unreachable ../one &&
220
- test_cmp expect output)
226
+ test_i18ncmp expect output)
227
'
228
229
test_expect_success 'prune' '
@@ -255,7 +261,7 @@ EOF
261
test_expect_success 'set-head --auto fails w/multiple HEADs' '
262
(cd test &&
263
test_must_fail git remote set-head --auto two >output 2>&1 &&
258
- test_cmp expect output)
264
+ test_i18ncmp expect output)
265
'
266
267
cat >test/expect <<EOF
@@ -285,7 +291,7 @@ test_expect_success 'prune --dry-run' '
291
test_must_fail git rev-parse refs/remotes/origin/side &&
292
(cd ../one &&
293
git branch -m side side2) &&
288
- test_cmp expect output)
294
+ test_i18ncmp expect output)
295
'
296
297
test_expect_success 'add --mirror && prune' '
@@ -705,7 +711,7 @@ test_expect_success 'remote prune to cause a dangling symref' '
711
cd seven &&
712
git remote prune origin
713
) >err 2>&1 &&
708
- grep "has become dangling" err &&
714
+ test_i18ngrep "has become dangling" err &&
715
716
: And the dangling symref will not cause other annoying errors &&
717
(