test: do not rely on US English tracking-info messages
When v1.7.9.2~28^2 (2012-02-02) marked "Your branch is behind" and friends for translation, it forgot to adjust tests not to check those messages when tests are being run with git configured to write its output in another language. With this patch applied, t2020 and t6040 pass again with GETTEXT_POISON=YesPlease. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Explained-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder committed
Apr 13, 2012 at 23:45 UTC
76642ccec813a1cc2ca1bf9539abeb5f17764808
2 files changed
+6
-6
t/t2020-checkout-detach.sh
+1
-1
@@ -148,7 +148,7 @@ test_expect_success 'tracking count is accurate after orphan check' '
148
git config branch.child.merge refs/heads/master &&
149
git checkout child^ &&
150
git checkout child >stdout &&
151
- test_cmp expect stdout
151
+ test_i18ncmp expect stdout
152
'
153
154
test_done
t/t6040-tracking-info.sh
+5
-5
@@ -71,13 +71,13 @@ test_expect_success 'checkout' '
71
(
72
cd test && git checkout b1
73
) >actual &&
74
- grep "have 1 and 1 different" actual
74
+ test_i18ngrep "have 1 and 1 different" actual
75
'
76
77
test_expect_success 'checkout with local tracked branch' '
78
git checkout master &&
79
git checkout follower >actual &&
80
- grep "is ahead of" actual
80
+ test_i18ngrep "is ahead of" actual
81
'
82
83
test_expect_success 'status' '
@@ -87,14 +87,14 @@ test_expect_success 'status' '
87
# reports nothing to commit
88
test_must_fail git commit --dry-run
89
) >actual &&
90
- grep "have 1 and 1 different" actual
90
+ test_i18ngrep "have 1 and 1 different" actual
91
'
92
93
test_expect_success 'fail to track lightweight tags' '
94
git checkout master &&
95
git tag light &&
96
test_must_fail git branch --track lighttrack light >actual &&
97
- test_must_fail grep "set up to track" actual &&
97
+ test_i18ngrep ! "set up to track" actual &&
98
test_must_fail git checkout lighttrack
99
'
100
@@ -102,7 +102,7 @@ test_expect_success 'fail to track annotated tags' '
102
git checkout master &&
103
git tag -m heavy heavy &&
104
test_must_fail git branch --track heavytrack heavy >actual &&
105
- test_must_fail grep "set up to track" actual &&
105
+ test_i18ngrep ! "set up to track" actual &&
106
test_must_fail git checkout heavytrack
107
'
108