Browse Source

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>
maint
Markus Heidelberg 15 years ago committed by Junio C Hamano
parent
commit
168eff3c80
  1. 20
      t/t4034-diff-words.sh

20
t/t4034-diff-words.sh

@ -63,6 +63,26 @@ test_expect_success 'word diff with runs of whitespace' ' @@ -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>

Loading…
Cancel
Save