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>
This commit is contained in:

committed by
Junio C Hamano

parent
ab33a76ec5
commit
1edbaac3bb
@ -75,7 +75,7 @@ test_expect_success TTY 'progress messages go to tty' '
|
||||
ensure_fresh_upstream &&
|
||||
|
||||
test_terminal git push -u upstream master >out 2>err &&
|
||||
grep "Writing objects" err
|
||||
test_i18ngrep "Writing objects" err
|
||||
'
|
||||
|
||||
test_expect_success 'progress messages do not go to non-tty' '
|
||||
@ -91,7 +91,7 @@ test_expect_success 'progress messages go to non-tty (forced)' '
|
||||
|
||||
# force progress messages to stderr, even though it is non-tty
|
||||
git push -u --progress upstream master >out 2>err &&
|
||||
grep "Writing objects" err
|
||||
test_i18ngrep "Writing objects" err
|
||||
'
|
||||
|
||||
test_expect_success TTY 'push -q suppresses progress' '
|
||||
|
Reference in New Issue
Block a user