summaryrefslogtreecommitdiff
path: root/t/t4026-color.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-11-20 15:25:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-11-20 20:42:49 (GMT)
commit17a4be26060b00a867cbe54ee906fe03813470ec (patch)
tree79257f8f0b06bd68a3a2783d9e44562dc2b96119 /t/t4026-color.sh
parent695d95df19b74485be62aba0f978044ff1215ea0 (diff)
downloadgit-17a4be26060b00a867cbe54ee906fe03813470ec.zip
git-17a4be26060b00a867cbe54ee906fe03813470ec.tar.gz
git-17a4be26060b00a867cbe54ee906fe03813470ec.tar.bz2
parse_color: support 24-bit RGB values
Some terminals (like XTerm) allow full 24-bit RGB color specifications using an extension to the regular ANSI color scheme. Let's allow users to specify hex RGB colors, enabling the all-important feature of hot pink ref decorations: git log --format="%h%C(#ff69b4)%d%C(reset) %s" Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4026-color.sh')
-rwxr-xr-xt/t4026-color.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/t4026-color.sh b/t/t4026-color.sh
index 63e4238..65386db 100755
--- a/t/t4026-color.sh
+++ b/t/t4026-color.sh
@@ -53,6 +53,10 @@ test_expect_success '256 colors' '
color "254 bold 255" "[1;38;5;254;48;5;255m"
'
+test_expect_success '24-bit colors' '
+ color "#ff00ff black" "[38;2;255;0;255;40m"
+'
+
test_expect_success '"normal" yields no color at all"' '
color "normal black" "[40m"
'