Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-12-15 20:39:53 +0300
committerJunio C Hamano <gitster@pobox.com>2021-12-15 20:39:53 +0300
commit15209c86126a00e8e26ced788019edabf100abaa (patch)
tree11972157c3f9ade90d52465a52f058b7f3367c31 /t
parent4e5fd9dbcd10257a4f6b8229c69990a4cd098032 (diff)
parentde658515ae1166577441da09fe7624769e263a3e (diff)
Merge branch 're/color-default-reset'
"default" and "reset" colors have been added to our palette. * re/color-default-reset: color: allow colors to be prefixed with "reset" color: support "default" to restore fg/bg color color: add missing GIT_COLOR_* white/black constants
Diffstat (limited to 't')
-rwxr-xr-xt/t4026-color.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t4026-color.sh b/t/t4026-color.sh
index cc73161b46..cc3f60d468 100755
--- a/t/t4026-color.sh
+++ b/t/t4026-color.sh
@@ -60,6 +60,10 @@ test_expect_success 'fg bg attr...' '
color "blue bold dim ul blink reverse" "[1;2;4;5;7;34m"
'
+test_expect_success 'reset fg bg attr...' '
+ color "reset blue bold dim ul blink reverse" "[;1;2;4;5;7;34m"
+'
+
# note that nobold and nodim are the same code (22)
test_expect_success 'attr negation' '
color "nobold nodim noul noblink noreverse" "[22;24;25;27m"
@@ -96,6 +100,18 @@ test_expect_success '24-bit colors' '
color "#ff00ff black" "[38;2;255;0;255;40m"
'
+test_expect_success '"default" foreground' '
+ color "default" "[39m"
+'
+
+test_expect_success '"normal default" to clear background' '
+ color "normal default" "[49m"
+'
+
+test_expect_success '"default" can be combined with attributes' '
+ color "default default no-reverse bold" "[1;27;39;49m"
+'
+
test_expect_success '"normal" yields no color at all"' '
color "normal black" "[40m"
'