summaryrefslogtreecommitdiff
path: root/t/t4015-diff-whitespace.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t4015-diff-whitespace.sh')
-rwxr-xr-xt/t4015-diff-whitespace.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh
index a27fccc8dc..ec98509fd2 100755
--- a/t/t4015-diff-whitespace.sh
+++ b/t/t4015-diff-whitespace.sh
@@ -341,4 +341,15 @@ test_expect_success 'checkdiff detects trailing blank lines' '
git diff --check | grep "ends with blank"
'
+test_expect_success 'checkdiff allows new blank lines' '
+ git checkout x &&
+ mv x y &&
+ (
+ echo "/* This is new */" &&
+ echo "" &&
+ cat y
+ ) >x &&
+ git diff --check
+'
+
test_done