summaryrefslogtreecommitdiff
path: root/t/t4026-color.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2015-01-20 22:14:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-01-20 23:56:03 (GMT)
commit3759d27aca3ddd78b4b1169a767809748dc1fc3f (patch)
tree731e77e963a86dec0dced2086c7e0c1439b827f5 /t/t4026-color.sh
parent71b59849753589c3faa04176e875071417ceddd5 (diff)
downloadgit-3759d27aca3ddd78b4b1169a767809748dc1fc3f.zip
git-3759d27aca3ddd78b4b1169a767809748dc1fc3f.tar.gz
git-3759d27aca3ddd78b4b1169a767809748dc1fc3f.tar.bz2
parse_color: fix return value for numeric color values 0-8
When commit 695d95d refactored the color parsing, it missed a "return 0" when parsing literal numbers 0-8 (which represent basic ANSI colors), leading us to report these colors as an error. 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 267c43b..4d20fea 100755
--- a/t/t4026-color.sh
+++ b/t/t4026-color.sh
@@ -60,6 +60,10 @@ test_expect_success 'absurdly long color specification' '
"[1;2;4;5;7;22;24;25;27;38;2;255;255;255;48;2;255;255;255m"
'
+test_expect_success '0-7 are aliases for basic ANSI color names' '
+ color "0 7" "[30;47m"
+'
+
test_expect_success '256 colors' '
color "254 bold 255" "[1;38;5;254;48;5;255m"
'