From a471833d51b0902d68f9190157bf1421d19a951a Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Wed, 20 Oct 2010 15:17:25 -0700 Subject: test-lib: extend test_decode_color to handle more color codes Enhance the test_decode_color function to handle all common color codes, including background colors and escapes that contain multiple codes. This change necessitates changing to , so update t4034 as well. This change is necessary for the next commit in order to test background colors properly. Signed-off-by: Kevin Ballard Signed-off-by: Junio C Hamano --- t/t4034-diff-words.sh | 72 +++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 't/t4034-diff-words.sh') diff --git a/t/t4034-diff-words.sh b/t/t4034-diff-words.sh index 6f7548c3a1..3f3c7577ca 100755 --- a/t/t4034-diff-words.sh +++ b/t/t4034-diff-words.sh @@ -35,10 +35,10 @@ aeff = aeff * ( aaa ) EOF cat > expect <<\EOF -diff --git a/pre b/post -index 330b04f..5ed8eff 100644 ---- a/pre -+++ b/post +diff --git a/pre b/post +index 330b04f..5ed8eff 100644 +--- a/pre ++++ b/post @@ -1,3 +1,7 @@ h(4)h(4),hh[44] @@ -122,10 +122,10 @@ test_expect_success '--word-diff=plain --no-color' ' ' cat > expect <diff --git a/pre b/post -index 330b04f..5ed8eff 100644 ---- a/pre -+++ b/post +diff --git a/pre b/post +index 330b04f..5ed8eff 100644 +--- a/pre ++++ b/post @@ -1,3 +1,7 @@ [-h(4)-]{+h(4),hh[44]+} @@ -143,10 +143,10 @@ test_expect_success '--word-diff=plain --color' ' ' cat > expect <<\EOF -diff --git a/pre b/post -index 330b04f..5ed8eff 100644 ---- a/pre -+++ b/post +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 @@ -163,10 +163,10 @@ test_expect_success 'word diff without context' ' ' cat > expect <<\EOF -diff --git a/pre b/post -index 330b04f..5ed8eff 100644 ---- a/pre -+++ b/post +diff --git a/pre b/post +index 330b04f..5ed8eff 100644 +--- a/pre ++++ b/post @@ -1,3 +1,7 @@ h(4),hh[44] @@ -199,10 +199,10 @@ test_expect_success 'option overrides .gitattributes' ' ' cat > expect <<\EOF -diff --git a/pre b/post -index 330b04f..5ed8eff 100644 ---- a/pre -+++ b/post +diff --git a/pre b/post +index 330b04f..5ed8eff 100644 +--- a/pre ++++ b/post @@ -1,3 +1,7 @@ h(4),hh[44] @@ -231,10 +231,10 @@ test_expect_success 'command-line overrides config' ' ' cat > expect <<\EOF -diff --git a/pre b/post -index 330b04f..5ed8eff 100644 ---- a/pre -+++ b/post +diff --git a/pre b/post +index 330b04f..5ed8eff 100644 +--- a/pre ++++ b/post @@ -1,3 +1,7 @@ h(4),{+hh+}[44] @@ -260,10 +260,10 @@ test_expect_success 'remove diff driver regex' ' ' cat > expect <<\EOF -diff --git a/pre b/post -index 330b04f..5ed8eff 100644 ---- a/pre -+++ b/post +diff --git a/pre b/post +index 330b04f..5ed8eff 100644 +--- a/pre ++++ b/post @@ -1,3 +1,7 @@ h(4),hh[44] @@ -282,10 +282,10 @@ echo 'aaa (aaa)' > pre echo 'aaa (aaa) aaa' > post cat > expect <<\EOF -diff --git a/pre b/post -index c29453b..be22f37 100644 ---- a/pre -+++ b/post +diff --git a/pre b/post +index c29453b..be22f37 100644 +--- a/pre ++++ b/post @@ -1 +1 @@ aaa (aaa) aaa EOF @@ -301,10 +301,10 @@ echo '(:' > pre echo '(' > post cat > expect <<\EOF -diff --git a/pre b/post -index 289cb9d..2d06f37 100644 ---- a/pre -+++ b/post +diff --git a/pre b/post +index 289cb9d..2d06f37 100644 +--- a/pre ++++ b/post @@ -1 +1 @@ (: EOF -- cgit v1.2.1