lib-log-graph: consolidate colored graph cmp logic

Signed-off-by: Abhishek Kumar <abhishekkumar8222@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Abhishek Kumar
2020-02-24 19:08:14 +05:30
committed by Junio C Hamano
parent 989eea958b
commit ffe005576a
4 changed files with 20 additions and 30 deletions

View File

@ -20,3 +20,9 @@ lib_test_cmp_short_graph () {
sanitize_log_output >output.sanitized <output &&
test_i18ncmp expect output.sanitized
}
lib_test_cmp_colored_graph () {
git log --graph --color=always "$@" >output.colors.raw &&
test_decode_color <output.colors.raw | sed "s/ *\$//" >output.colors &&
test_cmp expect.colors output.colors
}