X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft4034-diff-words.sh;fp=t%2Ft4034-diff-words.sh;h=2e2e103b31332ea2f74de5d5e6e49c00b13dfa8a;hb=c2ff10c98e22ae64d553273e6d67bb123a1c916f;hp=17621dd5a412620299f53eecb7e247b3829e25c5;hpb=3c5884536563518ce6cd4dc782b0ebb670bf3b6d;p=git.git diff --git a/t/t4034-diff-words.sh b/t/t4034-diff-words.sh index 17621dd5a..2e2e103b3 100755 --- a/t/t4034-diff-words.sh +++ b/t/t4034-diff-words.sh @@ -8,6 +8,7 @@ test_expect_success setup ' git config diff.color.old red git config diff.color.new green + git config diff.color.func magenta ' @@ -40,7 +41,7 @@ cat > expect <<\EOF +++ b/post @@ -1,3 +1,7 @@ h(4)h(4),hh[44] - + a = b + c aa = a @@ -54,6 +55,26 @@ test_expect_success 'word diff with runs of whitespace' ' ' +cat > expect <<\EOF +diff --git a/pre b/post +index 330b04f..5ed8eff 100644 +--- a/pre ++++ b/post +@@ -1 +1 @@ +h(4)h(4),hh[44] +@@ -3,0 +4,4 @@ a = b + c + +aa = a + +aeff = aeff * ( aaa ) +EOF + +test_expect_success 'word diff without context' ' + + word_diff --color-words --unified=0 + +' + cat > expect <<\EOF diff --git a/pre b/post index 330b04f..5ed8eff 100644 @@ -61,7 +82,7 @@ cat > expect <<\EOF +++ b/post @@ -1,3 +1,7 @@ h(4),hh[44] - + a = b + c aa = a @@ -97,7 +118,7 @@ cat > expect <<\EOF +++ b/post @@ -1,3 +1,7 @@ h(4),hh[44] - + a = b + c aa = a @@ -139,7 +160,7 @@ cat > expect <<\EOF +++ b/post @@ -1,3 +1,7 @@ h(4),hh[44] - + a = b + c aa = a