X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft4019-diff-wserror.sh;h=3a3663fbcb4795a9e3755fe831c89a7e312f659e;hb=3920917861e35cddb4946bd91db70510bc040361;hp=84a1fe31151c2af38554eaca8f03e2c1e2e7848f;hpb=6ef1daf77202aee71056771d91dd12121c6061fd;p=git.git diff --git a/t/t4019-diff-wserror.sh b/t/t4019-diff-wserror.sh index 84a1fe311..3a3663fbc 100755 --- a/t/t4019-diff-wserror.sh +++ b/t/t4019-diff-wserror.sh @@ -165,7 +165,7 @@ test_expect_success 'trailing empty lines (1)' ' rm -f .gitattributes && test_must_fail git diff --check >output && - grep "ends with blank lines." output && + grep "new blank line at" output && grep "trailing whitespace" output ' @@ -190,4 +190,13 @@ test_expect_success 'do not color trailing cr in context' ' ' +test_expect_success 'color new trailing blank lines' ' + { echo a; echo b; echo; echo; } >x && + git add x && + { echo a; echo; echo; echo; echo c; echo; echo; echo; echo; } >x && + git diff --color x >output && + cnt=$(grep "${blue_grep}" output | wc -l) && + test $cnt = 2 +' + test_done