]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t4015-diff-whitespace.sh
Teach "diff --check" about new blank lines at end
[thirdparty/git.git] / t / t4015-diff-whitespace.sh
index b7cc6b28e61e73af3206a9613620a635a467ea0e..0922c708f16fea490a85d16d5d4d366df0fb2088 100755 (executable)
@@ -335,4 +335,10 @@ test_expect_success 'line numbers in --check output are correct' '
 
 '
 
+test_expect_success 'checkdiff detects trailing blank lines' '
+       echo "foo();" >x &&
+       echo "" >>x &&
+       git diff --check | grep "ends with blank"
+'
+
 test_done