]> git.ipfire.org Git - thirdparty/git.git/commit - t/test-lib-functions.sh
t: use test_decode_color rather than literal ANSI codes
authorJeff King <peff@peff.net>
Thu, 13 Jul 2017 14:58:41 +0000 (10:58 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Jul 2017 19:42:50 +0000 (12:42 -0700)
commit097b681baac3a5e9455c74e3072a458249691e40
treefc7ea06a96e684f7ce2b1577a374b68cfb5ba889
parent5d3d0681abb8f2bc2383ee7660cf2b02e89cdd07
t: use test_decode_color rather than literal ANSI codes

When we put literal ANSI terminal codes into our test
scripts, it makes diffs on those scripts hard to read (the
colors may be indistinguishable from diff coloring, or in
the case of a reset, may not be visible at all).

Some scripts get around this by including human-readable
names and converting to literal codes with a git-config
hack. This makes the actual code diffs look OK, but test_cmp
output suffers from the same problem.

Let's use test_decode_color instead, which turns the codes
into obvious text tags.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4207-log-decoration-colors.sh
t/t6006-rev-list-format.sh
t/t6300-for-each-ref.sh
t/test-lib-functions.sh