Skip to content

Commit 0c49b95

Browse files
peffgitster
authored andcommitted
t: add matching negative attributes to test_decode_color
Most of the ANSI color attributes have an "off" variant. We don't use these yet in our test suite, so we never bothered to decode them. Add the ones that match the attributes we encode so we can make use of them. There are even more attributes not covered on the positive side, so this is meant to be useful but not all-inclusive. Note that "nobold" and "nodim" are the same code, so I've decoded this as "normal intensity". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 05002f6 commit 0c49b95

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

t/test-lib-functions.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ test_decode_color () {
4848
if (n == 2) return "FAINT";
4949
if (n == 3) return "ITALIC";
5050
if (n == 7) return "REVERSE";
51+
if (n == 22) return "NORMAL_INTENSITY";
52+
if (n == 23) return "NOITALIC";
53+
if (n == 27) return "NOREVERSE";
5154
if (n == 30) return "BLACK";
5255
if (n == 31) return "RED";
5356
if (n == 32) return "GREEN";

0 commit comments

Comments
 (0)