X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft4019-diff-wserror.sh;h=3fa836f9d3c19f351ce5451049eb191776cbd4a5;hb=208247adb9fc3702f87c6ec3fc26bd85d10d73e6;hp=f7c85ec604df5e037990065ab9d3d82d86587076;hpb=cbcf0a6981687b31635d806f45e77188c54b7cfc;p=git.git diff --git a/t/t4019-diff-wserror.sh b/t/t4019-diff-wserror.sh index f7c85ec60..3fa836f9d 100755 --- a/t/t4019-diff-wserror.sh +++ b/t/t4019-diff-wserror.sh @@ -179,6 +179,15 @@ test_expect_success 'trailing empty lines (2)' ' ' +test_expect_success 'checkdiff shows correct line number for trailing blank lines' ' + + printf "a\nb\n" > G && + git add G && + printf "x\nx\nx\na\nb\nc\n\n" > G && + [ "$(git diff --check -- G)" = "G:7: new blank line at EOF." ] + +' + test_expect_success 'do not color trailing cr in context' ' test_might_fail git config --unset core.whitespace && rm -f .gitattributes &&