diff --color: color blank-at-eof
[gitweb.git] / t / t4019-diff-wserror.sh
index 1517fff9c64f711a6fd3dda6361a338d0e1fdfe0..1e75f1a1108f1d82e65511c9cfc19fee70866205 100755 (executable)
@@ -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; } >x &&
+       git diff --color x >output &&
+       cnt=$(grep "${blue_grep}" output | wc -l) &&
+       test $cnt = 2
+'
+
 test_done