]> Kevux Git Server - rit/commit
diff-highlight: use test_decode_color in tests
authorJeff King <peff@peff.net>
Mon, 23 Mar 2026 06:02:10 +0000 (02:02 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Mar 2026 14:42:27 +0000 (07:42 -0700)
commite57daf91ed0bde19595543c68c90948d5c47ebc6
tree9505ad5f9f5222040f46172f18a942f930e0463c
parent0c49b950e8a0013c00051ad7a598a5ae0a2cdd07
diff-highlight: use test_decode_color in tests

The diff-highlight tests use raw color bytes when comparing expected and
actual output. Let's use test_decode_color, which is our usual technique
in other tests. It makes reading test output diffs a bit easier, since
you're not relying on your terminal to interpret the result (or worse,
interpreting characters yourself via "cat -A").

This will also make it easier to add tests with new colors/attributes,
without having to pre-define the byte sequences ourselves.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/diff-highlight/t/t9400-diff-highlight.sh