tests: unpack-trees: update to use test_i18n* functions
authorVasco Almeida <vascomalmeida@sapo.pt>
Fri, 17 Jun 2016 20:21:08 +0000 (20:21 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 17 Jun 2016 22:45:48 +0000 (15:45 -0700)
Use functions test_i18ncmp and test_i18ngrep to successfully pass tests
running under GETTEXT_POISON.

The output strings compared to in these test were marked for translation
in ed47fdf ("i18n: unpack-trees: mark strings for translation",
2016-04-09) and later improved in 2e3926b ("i18n: unpack-trees: avoid
substituting only a verb in sentences", 2016-05-12).

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1011-read-tree-sparse-checkout.sh
t/t3400-rebase.sh
t/t3404-rebase-interactive.sh
t/t7607-merge-overwrite.sh
index 0c74beedd22600e8dfe852393a5a9a36350cfeb5..3583105698d334ada7c7983c81ea7df74eaa3bde 100755 (executable)
@@ -247,7 +247,7 @@ error: The following untracked working tree files would be overwritten by checko
 Please move or remove them before you can switch branches.
 Aborting
 EOF
 Please move or remove them before you can switch branches.
 Aborting
 EOF
-       test_cmp expected actual
+       test_i18ncmp expected actual
 '
 
 test_expect_success 'checkout without --ignore-skip-worktree-bits' '
 '
 
 test_expect_success 'checkout without --ignore-skip-worktree-bits' '
index 47b5682662a6ed2e6734f9f9f101a5ddabcc22ff..f5fd15e55994bafc0f0a2c91b0d00455df13d18d 100755 (executable)
@@ -136,8 +136,8 @@ test_expect_success 'setup: recover' '
 test_expect_success 'Show verbose error when HEAD could not be detached' '
        >B &&
        test_must_fail git rebase topic 2>output.err >output.out &&
 test_expect_success 'Show verbose error when HEAD could not be detached' '
        >B &&
        test_must_fail git rebase topic 2>output.err >output.out &&
-       grep "The following untracked working tree files would be overwritten by checkout:" output.err &&
-       grep B output.err
+       test_i18ngrep "The following untracked working tree files would be overwritten by checkout:" output.err &&
+       test_i18ngrep B output.err
 '
 rm -f B
 
 '
 rm -f B
 
index f4ccd1099f3211fc5c4eece4497032054cb540e5..8ac18682146008d9a5f9880628dec79daeac4090 100755 (executable)
@@ -219,9 +219,9 @@ test_expect_success 'abort with error when new base cannot be checked out' '
        git commit -m "remove file in base" &&
        set_fake_editor &&
        test_must_fail git rebase -i master > output 2>&1 &&
        git commit -m "remove file in base" &&
        set_fake_editor &&
        test_must_fail git rebase -i master > output 2>&1 &&
-       grep "The following untracked working tree files would be overwritten by checkout:" \
+       test_i18ngrep "The following untracked working tree files would be overwritten by checkout:" \
                output &&
                output &&
-       grep "file1" output &&
+       test_i18ngrep "file1" output &&
        test_path_is_missing .git/rebase-merge &&
        git reset --hard HEAD^
 '
        test_path_is_missing .git/rebase-merge &&
        git reset --hard HEAD^
 '
index 758a623cdbb5f7e367bcfce5c239d79258c46e84..e8ec54c134d92c17315a29661069eb9a7a921ba6 100755 (executable)
@@ -125,7 +125,7 @@ test_expect_success 'will not overwrite untracked file in leading path' '
        cp important sub &&
        cp important sub2 &&
        test_must_fail git merge sub 2>out &&
        cp important sub &&
        cp important sub2 &&
        test_must_fail git merge sub 2>out &&
-       test_cmp out expect &&
+       test_i18ncmp out expect &&
        test_path_is_missing .git/MERGE_HEAD &&
        test_cmp important sub &&
        test_cmp important sub2 &&
        test_path_is_missing .git/MERGE_HEAD &&
        test_cmp important sub &&
        test_cmp important sub2 &&