Skip to content

Commit b354f11

Browse files
jiangxingitster
authored andcommitted
Fix tests under GETTEXT_POISON on diffstat
Use the i18n-specific test functions in test scripts for diffstat. This issue was was introduced in v1.7.9-1-g7f814: 7f814 Use correct grammar in diffstat summary line 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 2878568 commit b354f11

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

t/t4006-diff-mode.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,24 @@ test_expect_success '--stat output after text chmod' '
3636
test_chmod -x rezrov &&
3737
echo " 0 files changed" >expect &&
3838
git diff HEAD --stat >actual &&
39-
test_cmp expect actual
39+
test_i18ncmp expect actual
4040
'
4141

4242
test_expect_success '--shortstat output after text chmod' '
4343
git diff HEAD --shortstat >actual &&
44-
test_cmp expect actual
44+
test_i18ncmp expect actual
4545
'
4646

4747
test_expect_success '--stat output after binary chmod' '
4848
test_chmod +x binbin &&
4949
echo " 0 files changed" >expect &&
5050
git diff HEAD --stat >actual &&
51-
test_cmp expect actual
51+
test_i18ncmp expect actual
5252
'
5353

5454
test_expect_success '--shortstat output after binary chmod' '
5555
git diff HEAD --shortstat >actual &&
56-
test_cmp expect actual
56+
test_i18ncmp expect actual
5757
'
5858

5959
test_done

t/t4202-log.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ sanitize_output () {
803803
test_expect_success 'log --graph with diff and stats' '
804804
git log --graph --pretty=short --stat -p >actual &&
805805
sanitize_output >actual.sanitized <actual &&
806-
test_cmp expect actual.sanitized
806+
test_i18ncmp expect actual.sanitized
807807
'
808808

809809
test_done

t/t4205-log-pretty-formats.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,15 @@ test_expect_success 'NUL separation with --stat' '
8888
stat1_part=$(git diff --stat --root HEAD^) &&
8989
printf "add bar\n$stat0_part\n\0initial\n$stat1_part\n" >expected &&
9090
git log -z --stat --pretty="format:%s" >actual &&
91-
test_cmp expected actual
91+
test_i18ncmp expected actual
9292
'
9393

9494
test_expect_failure 'NUL termination with --stat' '
9595
stat0_part=$(git diff --stat HEAD^ HEAD) &&
9696
stat1_part=$(git diff --stat --root HEAD^) &&
9797
printf "add bar\n$stat0_part\n\0initial\n$stat1_part\n\0" >expected &&
9898
git log -z --stat --pretty="tformat:%s" >actual &&
99-
test_cmp expected actual
99+
test_i18ncmp expected actual
100100
'
101101

102102
test_done

t/t7508-status.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ test_expect_success 'status --column' '
8080
# dir1/untracked dir2/untracked untracked
8181
# dir2/modified output
8282
EOF
83-
test_cmp expect output
83+
test_i18ncmp expect output
8484
'
8585

8686
cat >expect <<\EOF

0 commit comments

Comments
 (0)