зеркало из https://github.com/microsoft/git.git
Revert "t6006: drop "always" color config tests"
This reverts commitc5bdfe677c
. That commit was done primarily to prepare for the weakening of "always" in6be4595edb
(color: make "always" the same as "auto" in config, 2017-10-03). But since we've now reverted6be4595edb
, there's no need for us to remove "-c color.ui=always" from the tests. And in fact it's a good idea to restore these tests, to make sure that "always" continues to work. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
2c1acdf6c9
Коммит
1d4b12fe7c
|
@ -208,11 +208,26 @@ do
|
|||
has_no_color actual
|
||||
'
|
||||
|
||||
test_expect_success "$desc enables colors for color.diff" '
|
||||
git -c color.diff=always log --format=$color -1 >actual &&
|
||||
has_color actual
|
||||
'
|
||||
|
||||
test_expect_success "$desc enables colors for color.ui" '
|
||||
git -c color.ui=always log --format=$color -1 >actual &&
|
||||
has_color actual
|
||||
'
|
||||
|
||||
test_expect_success "$desc respects --color" '
|
||||
git log --format=$color -1 --color >actual &&
|
||||
has_color actual
|
||||
'
|
||||
|
||||
test_expect_success "$desc respects --no-color" '
|
||||
git -c color.ui=always log --format=$color -1 --no-color >actual &&
|
||||
has_no_color actual
|
||||
'
|
||||
|
||||
test_expect_success TTY "$desc respects --color=auto (stdout is tty)" '
|
||||
test_terminal git log --format=$color -1 --color=auto >actual &&
|
||||
has_color actual
|
||||
|
@ -225,11 +240,6 @@ do
|
|||
has_no_color actual
|
||||
)
|
||||
'
|
||||
|
||||
test_expect_success TTY "$desc respects --no-color" '
|
||||
test_terminal git log --format=$color -1 --no-color >actual &&
|
||||
has_no_color actual
|
||||
'
|
||||
done
|
||||
|
||||
test_expect_success '%C(always,...) enables color even without tty' '
|
||||
|
|
Загрузка…
Ссылка в новой задаче