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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
269c73e8d3
commit
3c788e79b8
@ -3,6 +3,7 @@
|
|||||||
test_description='git clean -i basic tests'
|
test_description='git clean -i basic tests'
|
||||||
|
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
|
. "$TEST_DIRECTORY"/lib-terminal.sh
|
||||||
|
|
||||||
test_expect_success 'setup' '
|
test_expect_success 'setup' '
|
||||||
|
|
||||||
@ -472,10 +473,10 @@ test_expect_success 'git clean -id with prefix and path (ask)' '
|
|||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'git clean -i paints the header in HEADER color' '
|
test_expect_success TTY 'git clean -i paints the header in HEADER color' '
|
||||||
>a.out &&
|
>a.out &&
|
||||||
echo q |
|
echo q |
|
||||||
git -c color.ui=always clean -i |
|
test_terminal env TERM=vt100 git clean -i |
|
||||||
test_decode_color |
|
test_decode_color |
|
||||||
head -n 1 >header &&
|
head -n 1 >header &&
|
||||||
# not i18ngrep
|
# not i18ngrep
|
||||||
|
Loading…
Reference in New Issue
Block a user