summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t8012-blame-colors.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t8012-blame-colors.sh b/t/t8012-blame-colors.sh
new file mode 100755
index 0000000000..98a22a3c8d
--- /dev/null
+++ b/t/t8012-blame-colors.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+test_description='colored git blame'
+. ./test-lib.sh
+
+PROG='git blame -c'
+. "$TEST_DIRECTORY"/annotate-tests.sh
+
+test_expect_success 'colored blame colors contiguous lines' '
+ git -c color.blame.repeatedLines=yellow blame --color-lines --abbrev=12 hello.c >actual.raw &&
+ test_decode_color <actual.raw >actual &&
+ grep "<YELLOW>" <actual >darkened &&
+ grep "(F" darkened > F.expect &&
+ grep "(H" darkened > H.expect &&
+ test_line_count = 2 F.expect &&
+ test_line_count = 3 H.expect
+'
+
+test_done