Skip to content

Commit 3c788e7

Browse files
peffgitster
authored andcommitted
t7301: use test_terminal to check color
This test wants to confirm that "clean -i" shows color output. Using test_terminal gives us a more realistic environment than "color.ui=always", and prepares us for the behavior of "always" changing in a future patch. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 269c73e commit 3c788e7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/t7301-clean-interactive.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
test_description='git clean -i basic tests'
44

55
. ./test-lib.sh
6+
. "$TEST_DIRECTORY"/lib-terminal.sh
67

78
test_expect_success 'setup' '
89
@@ -472,10 +473,10 @@ test_expect_success 'git clean -id with prefix and path (ask)' '
472473
473474
'
474475

475-
test_expect_success 'git clean -i paints the header in HEADER color' '
476+
test_expect_success TTY 'git clean -i paints the header in HEADER color' '
476477
>a.out &&
477478
echo q |
478-
git -c color.ui=always clean -i |
479+
test_terminal env TERM=vt100 git clean -i |
479480
test_decode_color |
480481
head -n 1 >header &&
481482
# not i18ngrep

0 commit comments

Comments
 (0)