diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-12-15 20:39:53 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-15 20:39:53 +0300 |
commit | 15209c86126a00e8e26ced788019edabf100abaa (patch) | |
tree | 11972157c3f9ade90d52465a52f058b7f3367c31 /t | |
parent | 4e5fd9dbcd10257a4f6b8229c69990a4cd098032 (diff) | |
parent | de658515ae1166577441da09fe7624769e263a3e (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-x | t/t4026-color.sh | 16 |
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" ' |