summaryrefslogtreecommitdiff
path: root/t/t6006-rev-list-format.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-10-13 17:23:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-17 06:09:26 (GMT)
commit1d4b12fe7c44da166070a4b577c62fb83127f10e (patch)
tree7af5a6a281144ac837c241c440d1159337ac87a8 /t/t6006-rev-list-format.sh
parent2c1acdf6c9f6668dc520e75709af8447587eb4d0 (diff)
downloadgit-1d4b12fe7c44da166070a4b577c62fb83127f10e.zip
git-1d4b12fe7c44da166070a4b577c62fb83127f10e.tar.gz
git-1d4b12fe7c44da166070a4b577c62fb83127f10e.tar.bz2
Revert "t6006: drop "always" color config tests"
This reverts commit c5bdfe677cfab5b2e87771c35565d44d3198efda. That commit was done primarily to prepare for the weakening of "always" in 6be4595edb (color: make "always" the same as "auto" in config, 2017-10-03). But since we've now reverted 6be4595edb, 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>
Diffstat (limited to 't/t6006-rev-list-format.sh')
-rwxr-xr-xt/t6006-rev-list-format.sh20
1 files changed, 15 insertions, 5 deletions
diff --git a/t/t6006-rev-list-format.sh b/t/t6006-rev-list-format.sh
index 25a9c65..98be78b 100755
--- a/t/t6006-rev-list-format.sh
+++ b/t/t6006-rev-list-format.sh
@@ -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' '