Browse Source

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>
maint
Jonathan Nieder 13 years ago committed by Junio C Hamano
parent
commit
76642ccec8
  1. 2
      t/t2020-checkout-detach.sh
  2. 10
      t/t6040-tracking-info.sh

2
t/t2020-checkout-detach.sh

@ -148,7 +148,7 @@ test_expect_success 'tracking count is accurate after orphan check' ' @@ -148,7 +148,7 @@ test_expect_success 'tracking count is accurate after orphan check' '
git config branch.child.merge refs/heads/master &&
git checkout child^ &&
git checkout child >stdout &&
test_cmp expect stdout
test_i18ncmp expect stdout
'

test_done

10
t/t6040-tracking-info.sh

@ -71,13 +71,13 @@ test_expect_success 'checkout' ' @@ -71,13 +71,13 @@ test_expect_success 'checkout' '
(
cd test && git checkout b1
) >actual &&
grep "have 1 and 1 different" actual
test_i18ngrep "have 1 and 1 different" actual
'

test_expect_success 'checkout with local tracked branch' '
git checkout master &&
git checkout follower >actual &&
grep "is ahead of" actual
test_i18ngrep "is ahead of" actual
'

test_expect_success 'status' '
@ -87,14 +87,14 @@ test_expect_success 'status' ' @@ -87,14 +87,14 @@ test_expect_success 'status' '
# reports nothing to commit
test_must_fail git commit --dry-run
) >actual &&
grep "have 1 and 1 different" actual
test_i18ngrep "have 1 and 1 different" actual
'

test_expect_success 'fail to track lightweight tags' '
git checkout master &&
git tag light &&
test_must_fail git branch --track lighttrack light >actual &&
test_must_fail grep "set up to track" actual &&
test_i18ngrep ! "set up to track" actual &&
test_must_fail git checkout lighttrack
'

@ -102,7 +102,7 @@ test_expect_success 'fail to track annotated tags' ' @@ -102,7 +102,7 @@ test_expect_success 'fail to track annotated tags' '
git checkout master &&
git tag -m heavy heavy &&
test_must_fail git branch --track heavytrack heavy >actual &&
test_must_fail grep "set up to track" actual &&
test_i18ngrep ! "set up to track" actual &&
test_must_fail git checkout heavytrack
'


Loading…
Cancel
Save