Skip to content

Commit 1d4b12f

Browse files
peffgitster
authored andcommitted
Revert "t6006: drop "always" color config tests"
This reverts commit c5bdfe6. That commit was done primarily to prepare for the weakening of "always" in 6be4595 (color: make "always" the same as "auto" in config, 2017-10-03). But since we've now reverted 6be4595, 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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2c1acdf commit 1d4b12f

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

t/t6006-rev-list-format.sh

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,26 @@ do
208208
has_no_color actual
209209
'
210210

211+
test_expect_success "$desc enables colors for color.diff" '
212+
git -c color.diff=always log --format=$color -1 >actual &&
213+
has_color actual
214+
'
215+
216+
test_expect_success "$desc enables colors for color.ui" '
217+
git -c color.ui=always log --format=$color -1 >actual &&
218+
has_color actual
219+
'
220+
211221
test_expect_success "$desc respects --color" '
212222
git log --format=$color -1 --color >actual &&
213223
has_color actual
214224
'
215225

226+
test_expect_success "$desc respects --no-color" '
227+
git -c color.ui=always log --format=$color -1 --no-color >actual &&
228+
has_no_color actual
229+
'
230+
216231
test_expect_success TTY "$desc respects --color=auto (stdout is tty)" '
217232
test_terminal git log --format=$color -1 --color=auto >actual &&
218233
has_color actual
@@ -225,11 +240,6 @@ do
225240
has_no_color actual
226241
)
227242
'
228-
229-
test_expect_success TTY "$desc respects --no-color" '
230-
test_terminal git log --format=$color -1 --no-color >actual &&
231-
has_no_color actual
232-
'
233243
done
234244

235245
test_expect_success '%C(always,...) enables color even without tty' '

0 commit comments

Comments
 (0)