X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft4034-diff-words.sh;h=2e2e103b31332ea2f74de5d5e6e49c00b13dfa8a;hb=c24138bc55bcbbde2ea8601c504752e5a39f53f2;hp=1c21276c55400c594f71bc01eba17b0d3820b420;hpb=7b576f9910a2945688f04f6ff9d03771f2956618;p=git.git diff --git a/t/t4034-diff-words.sh b/t/t4034-diff-words.sh index 1c21276c5..2e2e103b3 100755 --- a/t/t4034-diff-words.sh +++ b/t/t4034-diff-words.sh @@ -12,19 +12,9 @@ test_expect_success setup ' ' -decrypt_color () { - sed \ - -e 's/.\[1m//g' \ - -e 's/.\[31m//g' \ - -e 's/.\[32m//g' \ - -e 's/.\[35m//g' \ - -e 's/.\[36m//g' \ - -e 's/.\[m//g' -} - word_diff () { test_must_fail git diff --no-index "$@" pre post > output && - decrypt_color < output > output.decrypted && + test_decode_color output.decrypted && test_cmp expect output.decrypted } @@ -49,7 +39,7 @@ cat > expect <<\EOF index 330b04f..5ed8eff 100644 --- a/pre +++ b/post -@@ -1,3 +1,7 @@ +@@ -1,3 +1,7 @@ h(4)h(4),hh[44] a = b + c @@ -70,9 +60,9 @@ cat > expect <<\EOF index 330b04f..5ed8eff 100644 --- a/pre +++ b/post -@@ -1 +1 @@ +@@ -1 +1 @@ h(4)h(4),hh[44] -@@ -3,0 +4,4 @@ a = b + c +@@ -3,0 +4,4 @@ a = b + c aa = a @@ -90,7 +80,7 @@ cat > expect <<\EOF index 330b04f..5ed8eff 100644 --- a/pre +++ b/post -@@ -1,3 +1,7 @@ +@@ -1,3 +1,7 @@ h(4),hh[44] a = b + c @@ -126,7 +116,7 @@ cat > expect <<\EOF index 330b04f..5ed8eff 100644 --- a/pre +++ b/post -@@ -1,3 +1,7 @@ +@@ -1,3 +1,7 @@ h(4),hh[44] a = b + c @@ -168,7 +158,7 @@ cat > expect <<\EOF index 330b04f..5ed8eff 100644 --- a/pre +++ b/post -@@ -1,3 +1,7 @@ +@@ -1,3 +1,7 @@ h(4),hh[44] a = b + c @@ -190,7 +180,7 @@ cat > expect <<\EOF index c29453b..be22f37 100644 --- a/pre +++ b/post -@@ -1 +1 @@ +@@ -1 +1 @@ aaa (aaa) aaa EOF @@ -209,7 +199,7 @@ cat > expect <<\EOF index 289cb9d..2d06f37 100644 --- a/pre +++ b/post -@@ -1 +1 @@ +@@ -1 +1 @@ (: EOF