Merge branch 'tr/maint-word-diff-incomplete-line'

* tr/maint-word-diff-incomplete-line:
  word-diff: ignore '\ No newline at eof' marker
This commit is contained in:
Junio C Hamano
2012-01-18 15:16:19 -08:00
2 changed files with 23 additions and 0 deletions

View File

@ -334,4 +334,18 @@ test_expect_success 'word-diff with diff.sbe' '
word_diff --word-diff=plain
'
test_expect_success 'word-diff with no newline at EOF' '
cat >expect <<-\EOF &&
diff --git a/pre b/post
index 7bf316e..3dd0303 100644
--- a/pre
+++ b/post
@@ -1 +1 @@
a a [-a-]{+ab+} a a
EOF
printf "%s" "a a a a a" >pre &&
printf "%s" "a a ab a a" >post &&
word_diff --word-diff=plain
'
test_done