@matheusbsbs / matheus-bagliano / commits / 168eff3c80
Fork 0

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>

Markus Heidelberg committed Oct 28, 2009 at 13:24 UTC 168eff3c802a47a4e8a97b2ec70d86e5f605a012
1 file changed +20
t/t4034-diff-words.sh
+20
@@ -63,6 +63,26 @@ test_expect_success 'word diff with runs of whitespace' '
63
64 '
65
66 +cat > expect <<\EOF
67 +<WHITE>diff --git a/pre b/post<RESET>
68 +<WHITE>index 330b04f..5ed8eff 100644<RESET>
69 +<WHITE>--- a/pre<RESET>
70 +<WHITE>+++ b/post<RESET>
71 +<BROWN>@@ -1 +1 @@<RESET>
72 +<RED>h(4)<RESET><GREEN>h(4),hh[44]<RESET>
73 +<BROWN>@@ -3,0 +4,4 @@ a = b + c<RESET>
74 +
75 +<GREEN>aa = a<RESET>
76 +
77 +<GREEN>aeff = aeff * ( aaa )<RESET>
78 +EOF
79 +
80 +test_expect_failure 'word diff without context' '
81 +
82 + word_diff --color-words --unified=0
83 +
84 +'
85 +
86 cat > expect <<\EOF
87 <WHITE>diff --git a/pre b/post<RESET>
88 <WHITE>index 330b04f..5ed8eff 100644<RESET>