t4034-diff-words: add a test for word diff without context

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Markus Heidelberg 2009-10-28 13:24:30 +01:00 committed by Junio C Hamano
parent 78d553b7d7
commit 168eff3c80

View File

@ -63,6 +63,26 @@ test_expect_success 'word diff with runs of whitespace' '
'
cat > expect <<\EOF
<WHITE>diff --git a/pre b/post<RESET>
<WHITE>index 330b04f..5ed8eff 100644<RESET>
<WHITE>--- a/pre<RESET>
<WHITE>+++ b/post<RESET>
<BROWN>@@ -1 +1 @@<RESET>
<RED>h(4)<RESET><GREEN>h(4),hh[44]<RESET>
<BROWN>@@ -3,0 +4,4 @@ a = b + c<RESET>
<GREEN>aa = a<RESET>
<GREEN>aeff = aeff * ( aaa )<RESET>
EOF
test_expect_failure 'word diff without context' '
word_diff --color-words --unified=0
'
cat > expect <<\EOF
<WHITE>diff --git a/pre b/post<RESET>
<WHITE>index 330b04f..5ed8eff 100644<RESET>