summaryrefslogtreecommitdiff
path: root/t/t6301-for-each-ref-errors.sh
diff options
context:
space:
mode:
authorVasco Almeida <vascomalmeida@sapo.pt>2016-06-17 20:21:07 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-06-17 22:45:48 (GMT)
commit1edbaac3bbe1a55cf3450ae7a350b50826d5d283 (patch)
tree8d96ba6ba90615e0c690b2e4cd4d9373ec66ee6f /t/t6301-for-each-ref-errors.sh
parentab33a76ec5313b00d630a14d2a843cdb942ed2be (diff)
downloadgit-1edbaac3bbe1a55cf3450ae7a350b50826d5d283.zip
git-1edbaac3bbe1a55cf3450ae7a350b50826d5d283.tar.gz
git-1edbaac3bbe1a55cf3450ae7a350b50826d5d283.tar.bz2
tests: use test_i18n* functions to suppress false positives
The test functions test_i18ncmp and test_i18ngrep pretend success if run under GETTEXT_POISON. By using those functions to test output which is correctly marked as translatable, enables one to detect if the strings newly marked for translation are from plumbing output. If they are indeed from plumbing, the test would fail, and the string should be unmarked, since it is not seen by users. Thus, it is productive to not have false positives when running the test under GETTEXT_POISON. This commit replaces normal test functions by their i18n aware variants in use-cases know to be correctly marked for translation, suppressing false positives. Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6301-for-each-ref-errors.sh')
-rwxr-xr-xt/t6301-for-each-ref-errors.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/t6301-for-each-ref-errors.sh b/t/t6301-for-each-ref-errors.sh
index cdb67a0..c734ce2 100755
--- a/t/t6301-for-each-ref-errors.sh
+++ b/t/t6301-for-each-ref-errors.sh
@@ -20,8 +20,8 @@ test_expect_success 'Broken refs are reported correctly' '
test_when_finished "rm -f .git/$r" &&
echo "warning: ignoring broken ref $r" >broken-err &&
git for-each-ref >out 2>err &&
- test_cmp full-list out &&
- test_cmp broken-err err
+ test_i18ncmp full-list out &&
+ test_i18ncmp broken-err err
'
test_expect_success 'NULL_SHA1 refs are reported correctly' '
@@ -31,10 +31,10 @@ test_expect_success 'NULL_SHA1 refs are reported correctly' '
echo "warning: ignoring broken ref $r" >zeros-err &&
git for-each-ref >out 2>err &&
test_cmp full-list out &&
- test_cmp zeros-err err &&
+ test_i18ncmp zeros-err err &&
git for-each-ref --format="%(objectname) %(refname)" >brief-out 2>brief-err &&
test_cmp brief-list brief-out &&
- test_cmp zeros-err brief-err
+ test_i18ncmp zeros-err brief-err
'
test_expect_success 'Missing objects are reported correctly' '
@@ -43,7 +43,7 @@ test_expect_success 'Missing objects are reported correctly' '
test_when_finished "rm -f .git/$r" &&
echo "fatal: missing object $MISSING for $r" >missing-err &&
test_must_fail git for-each-ref 2>err &&
- test_cmp missing-err err &&
+ test_i18ncmp missing-err err &&
(
cat brief-list &&
echo "$MISSING $r"