diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t8012-blame-colors.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/t/t8012-blame-colors.sh b/t/t8012-blame-colors.sh index 98a22a3c8d..ae9aa79d4e 100755 --- a/t/t8012-blame-colors.sh +++ b/t/t8012-blame-colors.sh @@ -16,4 +16,29 @@ test_expect_success 'colored blame colors contiguous lines' ' test_line_count = 3 H.expect ' +test_expect_success 'color by age consistently colors old code' ' + git blame --color-by-age hello.c >actual.raw && + test_decode_color <actual.raw >actual && + grep "<BLUE>" <actual >colored && + test_line_count = 10 colored +' + +test_expect_success 'blame color by age: new code is different' ' + cat >>hello.c <<-EOF && + void qfunc(); + EOF + git add hello.c && + GIT_AUTHOR_DATE="" git commit -m "new commit" && + + git -c color.blame.highlightRecent="yellow,1 month ago, cyan" blame --color-by-age hello.c >actual.raw && + test_decode_color <actual.raw >actual && + + grep "<YELLOW>" <actual >colored && + test_line_count = 10 colored && + + grep "<CYAN>" <actual >colored && + test_line_count = 1 colored && + grep qfunc colored +' + test_done |