aboutsummaryrefslogtreecommitdiff
path: root/t/t4034-diff-words.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-01-18 15:16:19 -0800
committerJunio C Hamano <gitster@pobox.com>2012-01-18 15:16:19 -0800
commit05c65cb1161f232c65b186d6d6eb3bce9c6a0924 (patch)
tree6eb5898b90cadc7196cffb9c9ad0ddabe12b914f /t/t4034-diff-words.sh
parentb63103e908af54e5e2eaa3faad350e4738ef0047 (diff)
parentc7c2bc0ac9e7f077771db53960d4917fda4b27a7 (diff)
downloadgit-05c65cb1161f232c65b186d6d6eb3bce9c6a0924.tar.gz
git-05c65cb1161f232c65b186d6d6eb3bce9c6a0924.tar.xz
Merge branch 'tr/maint-word-diff-incomplete-line'
* tr/maint-word-diff-incomplete-line: word-diff: ignore '\ No newline at eof' marker
Diffstat (limited to 't/t4034-diff-words.sh')
-rwxr-xr-xt/t4034-diff-words.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t4034-diff-words.sh b/t/t4034-diff-words.sh
index 6f1e5a2a1..5c2012111 100755
--- a/t/t4034-diff-words.sh
+++ b/t/t4034-diff-words.sh
@@ -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