Fourth batch
[gitweb.git] / t / t4019-diff-wserror.sh
index 6f992c88eb7cb6986834512bc97f9d88d628707d..c6135c75488ff01797a98e43163e0b0c5e6be169 100755 (executable)
@@ -260,7 +260,16 @@ test_expect_success 'trailing empty lines (2)' '
 
        echo "F -whitespace" >.gitattributes &&
        git diff --check >output &&
-       ! test -s output
+       test_must_be_empty output
+
+'
+
+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." ]
 
 '