diff options
author | Jeff King <peff@peff.net> | 2017-10-03 09:44:27 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-04 11:32:56 +0900 |
commit | c5bdfe677cfab5b2e87771c35565d44d3198efda (patch) | |
tree | 11772dade47b76afdef24c6a25558e6f7359dc1c /t/t6006-rev-list-format.sh | |
parent | t7502: use diff.noprefix for --verbose test (diff) | |
download | tgif-c5bdfe677cfab5b2e87771c35565d44d3198efda.tar.xz |
t6006: drop "always" color config tests
We test the %C() format placeholders with a variety of
color-inducing options, including "--color" and
"-c color.ui=always". In preparation for the behavior of
"always" changing, we need to do something with those
"always" tests.
We can drop ones that expect "always" to turn on color even
to a file, as that will become a synonym for "auto", which
is already tested.
For the "--no-color" test, we need to make sure that color
would otherwise be shown. To do this, we can use
test_terminal, which enables colors in the default setup.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6006-rev-list-format.sh')
-rwxr-xr-x | t/t6006-rev-list-format.sh | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh index 98be78b4a2..25a9c65dc5 100755 --- a/t/t6006-rev-list-format.sh +++ b/t/t6006-rev-list-format.sh @@ -208,26 +208,11 @@ 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 @@ -240,6 +225,11 @@ 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' ' |