Fix tests under GETTEXT_POISON on git-apply

Use the i18n-specific test functions in test scripts for git-apply. This issue was was introduced in the following commits: de373 i18n: apply: mark parseopt strings for translation 3638e i18n: apply: mark strings for translation and been broken under GETTEXT_POISON=YesPlease since. Signed-off-by: Jiang Xin <worldhello.net@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jiang Xin committed Aug 27, 2012 at 13:36 UTC 76638d90e88374f8b1396e4fce75a424260ba6da
3 files changed +6 -6
t/t4012-diff-binary.sh
+2 -2
@@ -63,7 +63,7 @@ test_expect_success 'apply --numstat understands diff --binary format' '
63
64 # apply needs to be able to skip the binary material correctly
65 # in order to report the line number of a corrupt patch.
66 -test_expect_success 'apply detecting corrupt patch correctly' '
66 +test_expect_success C_LOCALE_OUTPUT 'apply detecting corrupt patch correctly' '
67 git diff >output &&
68 sed -e "s/-CIT/xCIT/" <output >broken &&
69 test_must_fail git apply --stat --summary broken 2>detected &&
@@ -73,7 +73,7 @@ test_expect_success 'apply detecting corrupt patch correctly' '
73 test "$detected" = xCIT
74 '
75
76 -test_expect_success 'apply detecting corrupt patch correctly' '
76 +test_expect_success C_LOCALE_OUTPUT 'apply detecting corrupt patch correctly' '
77 git diff --binary | sed -e "s/-CIT/xCIT/" >broken &&
78 test_must_fail git apply --stat --summary broken 2>detected &&
79 detected=`cat detected` &&
t/t4120-apply-popt.sh
+2 -2
@@ -32,7 +32,7 @@ test_expect_success 'apply git diff with -p2' '
32 test_expect_success 'apply with too large -p' '
33 cp file1.saved file1 &&
34 test_must_fail git apply --stat -p3 patch.file 2>err &&
35 - grep "removing 3 leading" err
35 + test_i18ngrep "removing 3 leading" err
36 '
37
38 test_expect_success 'apply (-p2) traditional diff with funny filenames' '
@@ -54,7 +54,7 @@ test_expect_success 'apply (-p2) traditional diff with funny filenames' '
54 test_expect_success 'apply with too large -p and fancy filename' '
55 cp file1.saved file1 &&
56 test_must_fail git apply --stat -p3 patch.escaped 2>err &&
57 - grep "removing 3 leading" err
57 + test_i18ngrep "removing 3 leading" err
58 '
59
60 test_expect_success 'apply (-p2) diff, mode change only' '
t/t4133-apply-filenames.sh
+2 -2
@@ -30,9 +30,9 @@ EOF
30
31 test_expect_success 'apply diff with inconsistent filenames in headers' '
32 test_must_fail git apply bad1.patch 2>err &&
33 - grep "inconsistent new filename" err &&
33 + test_i18ngrep "inconsistent new filename" err &&
34 test_must_fail git apply bad2.patch 2>err &&
35 - grep "inconsistent old filename" err
35 + test_i18ngrep "inconsistent old filename" err
36 '
37
38 test_done