t5523: use test_i18ngrep for negation
authorVasco Almeida <vascomalmeida@sapo.pt>
Fri, 17 Jun 2016 20:21:11 +0000 (20:21 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 17 Jun 2016 22:45:48 +0000 (15:45 -0700)
Replace the first form with the second one:

! grep expected actual
test_i18ngrep ! expected actual

The latter syntax is supported by test_i18ngrep defined in
t/test-lib.sh.

Although the test already passes whether GETTEXT_POSION is enabled, use
the i18n grep variant for the sake of consistency and also to make
obvious that those strings are subject to i18n.

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5523-push-upstream.sh
index 4a7b98b4788b93bd216643ef90a764e144abf3da..d6981ba304b0b1f2da22d8ec14d4b472b54f3415 100755 (executable)
@@ -83,7 +83,7 @@ test_expect_success 'progress messages do not go to non-tty' '
 
        # skip progress messages, since stderr is non-tty
        git push -u upstream master >out 2>err &&
-       ! grep "Writing objects" err
+       test_i18ngrep ! "Writing objects" err
 '
 
 test_expect_success 'progress messages go to non-tty (forced)' '
@@ -98,15 +98,15 @@ test_expect_success TTY 'push -q suppresses progress' '
        ensure_fresh_upstream &&
 
        test_terminal git push -u -q upstream master >out 2>err &&
-       ! grep "Writing objects" err
+       test_i18ngrep ! "Writing objects" err
 '
 
 test_expect_success TTY 'push --no-progress suppresses progress' '
        ensure_fresh_upstream &&
 
        test_terminal git push -u --no-progress upstream master >out 2>err &&
-       ! grep "Unpacking objects" err &&
-       ! grep "Writing objects" err
+       test_i18ngrep ! "Unpacking objects" err &&
+       test_i18ngrep ! "Writing objects" err
 '
 
 test_expect_success TTY 'quiet push' '