aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-11-16 00:01:56 -0800
committerJunio C Hamano <gitster@pobox.com>2009-11-16 00:01:56 -0800
commitd404a3e1a5588fa075e4fae6679603a5add2e4df (patch)
tree499295d3bfe889ac42d11a0cd7e7a26fb9d40225 /t
parentee16339d044bf594d7e6f6d178c03d8c0bff20fb (diff)
parent76fd28283f7eeea246a06994edd43ab60e59d853 (diff)
downloadgit-d404a3e1a5588fa075e4fae6679603a5add2e4df.tar.gz
git-d404a3e1a5588fa075e4fae6679603a5add2e4df.tar.xz
Merge branch 'js/maint-diff-color-words' into maint
* js/maint-diff-color-words: diff --color-words: bit of clean-up diff --color-words -U0: fix the location of hunk headers t4034-diff-words: add a test for word diff without context Conflicts: diff.c
Diffstat (limited to 't')
-rwxr-xr-xt/t4034-diff-words.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/t4034-diff-words.sh b/t/t4034-diff-words.sh
index 4508effca..21db6e95c 100755
--- a/t/t4034-diff-words.sh
+++ b/t/t4034-diff-words.sh
@@ -68,6 +68,26 @@ cat > expect <<\EOF
<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_success '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>
+<WHITE>--- a/pre<RESET>
+<WHITE>+++ b/post<RESET>
<BROWN>@@ -1,3 +1,7 @@<RESET>
h(4),<GREEN>hh<RESET>[44]
<RESET>