Skip to content

Commit 76638d9

Browse files
jiangxingitster
authored andcommitted
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>
1 parent b354f11 commit 76638d9

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

t/t4012-diff-binary.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ test_expect_success 'apply --numstat understands diff --binary format' '
6363

6464
# apply needs to be able to skip the binary material correctly
6565
# 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' '
6767
git diff >output &&
6868
sed -e "s/-CIT/xCIT/" <output >broken &&
6969
test_must_fail git apply --stat --summary broken 2>detected &&
@@ -73,7 +73,7 @@ test_expect_success 'apply detecting corrupt patch correctly' '
7373
test "$detected" = xCIT
7474
'
7575

76-
test_expect_success 'apply detecting corrupt patch correctly' '
76+
test_expect_success C_LOCALE_OUTPUT 'apply detecting corrupt patch correctly' '
7777
git diff --binary | sed -e "s/-CIT/xCIT/" >broken &&
7878
test_must_fail git apply --stat --summary broken 2>detected &&
7979
detected=`cat detected` &&

t/t4120-apply-popt.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ test_expect_success 'apply git diff with -p2' '
3232
test_expect_success 'apply with too large -p' '
3333
cp file1.saved file1 &&
3434
test_must_fail git apply --stat -p3 patch.file 2>err &&
35-
grep "removing 3 leading" err
35+
test_i18ngrep "removing 3 leading" err
3636
'
3737

3838
test_expect_success 'apply (-p2) traditional diff with funny filenames' '
@@ -54,7 +54,7 @@ test_expect_success 'apply (-p2) traditional diff with funny filenames' '
5454
test_expect_success 'apply with too large -p and fancy filename' '
5555
cp file1.saved file1 &&
5656
test_must_fail git apply --stat -p3 patch.escaped 2>err &&
57-
grep "removing 3 leading" err
57+
test_i18ngrep "removing 3 leading" err
5858
'
5959

6060
test_expect_success 'apply (-p2) diff, mode change only' '

t/t4133-apply-filenames.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ EOF
3030

3131
test_expect_success 'apply diff with inconsistent filenames in headers' '
3232
test_must_fail git apply bad1.patch 2>err &&
33-
grep "inconsistent new filename" err &&
33+
test_i18ngrep "inconsistent new filename" err &&
3434
test_must_fail git apply bad2.patch 2>err &&
35-
grep "inconsistent old filename" err
35+
test_i18ngrep "inconsistent old filename" err
3636
'
3737

3838
test_done

0 commit comments

Comments
 (0)