diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-10-28 11:26:55 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-10-28 11:26:55 -0700 |
| commit | 7d5a4d86a652ababe2ee1bbd27dcf0ccd30dd1c0 (patch) | |
| tree | 46302cdd8739c3b5a68a7b70e7ff40c7ca19e364 /t/t4012-diff-binary.sh | |
| parent | Merge branch 'mm/git-pm-try-catch-syntax-fix' (diff) | |
| parent | diff: leave NEEDWORK notes in show_stats() function (diff) | |
| download | git-7d5a4d86a652ababe2ee1bbd27dcf0ccd30dd1c0.tar.gz git-7d5a4d86a652ababe2ee1bbd27dcf0ccd30dd1c0.zip | |
Merge branch 'tb/diffstat-with-utf8-strwidth'
"git diff --stat" etc. were invented back when everything was ASCII
and strlen() was a way to measure the display width of a string;
adjust them to compute the display width assuming UTF-8 pathnames.
* tb/diffstat-with-utf8-strwidth:
diff: leave NEEDWORK notes in show_stats() function
diff.c: use utf8_strwidth() to count display width
Diffstat (limited to 't/t4012-diff-binary.sh')
| -rwxr-xr-x | t/t4012-diff-binary.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh index c509143c81..c64d9d2f40 100755 --- a/t/t4012-diff-binary.sh +++ b/t/t4012-diff-binary.sh @@ -113,20 +113,20 @@ test_expect_success 'diff --no-index with binary creation' ' ' cat >expect <<EOF - binfile | Bin 0 -> 1026 bytes - textfile | 10000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + binfilë | Bin 0 -> 1026 bytes + tëxtfilë | 10000 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ EOF test_expect_success 'diff --stat with binary files and big change count' ' - printf "\01\00%1024d" 1 >binfile && - git add binfile && + printf "\01\00%1024d" 1 >binfilë && + git add binfilë && i=0 && while test $i -lt 10000; do echo $i && i=$(($i + 1)) || return 1 - done >textfile && - git add textfile && - git diff --cached --stat binfile textfile >output && + done >tëxtfilë && + git add tëxtfilë && + git -c core.quotepath=false diff --cached --stat binfilë tëxtfilë >output && grep " | " output >actual && test_cmp expect actual ' |
