X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=t%2Ft4012-diff-binary.sh;h=323606c65c424814afc4847d40af8796e39ce4cf;hb=210a0be504829bad5a2821488d3c25cc406fed4a;hp=bdd95c0d3dd8e4a5986ddfc6ac9e68abc69c971b;hpb=328b710d800dc3786fe2b8595e5553dc4a4af424;p=git.git diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh index bdd95c0d..323606c6 100755 --- a/t/t4012-diff-binary.sh +++ b/t/t4012-diff-binary.sh @@ -16,25 +16,20 @@ test_expect_success 'prepare repository' \ echo git >c && cat b b >d' -test_expect_success 'diff without --binary' \ - 'git-diff | git-apply --stat --summary >current && - cmp current - <<\EOF +cat > expected <<\EOF a | 2 +- b | Bin c | 2 +- d | Bin 4 files changed, 2 insertions(+), 2 deletions(-) -EOF' +EOF +test_expect_success 'diff without --binary' \ + 'git-diff | git-apply --stat --summary >current && + cmp current expected' test_expect_success 'diff with --binary' \ 'git-diff --binary | git-apply --stat --summary >current && - cmp current - <<\EOF - a | 2 +- - b | Bin - c | 2 +- - d | Bin - 4 files changed, 2 insertions(+), 2 deletions(-) -EOF' + cmp current expected' # apply needs to be able to skip the binary material correctly # in order to report the line number of a corrupt patch.