summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2017-10-03 09:44:58 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-10-04 11:49:31 +0900
commit3c788e79b8570c9015f6077591c819862a7e39e8 (patch)
tree0f3299677e42991a89fa3cf5f828d3e6f543ff20 /t
parentt4015: use --color with --color-moved (diff)
downloadtgif-3c788e79b8570c9015f6077591c819862a7e39e8.tar.xz
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>
Diffstat (limited to 't')
-rwxr-xr-xt/t7301-clean-interactive.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/t7301-clean-interactive.sh b/t/t7301-clean-interactive.sh
index 556e1850e2..39212dccd2 100755
--- a/t/t7301-clean-interactive.sh
+++ b/t/t7301-clean-interactive.sh
@@ -3,6 +3,7 @@
test_description='git clean -i basic tests'
. ./test-lib.sh
+. "$TEST_DIRECTORY"/lib-terminal.sh
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 &&
echo q |
- git -c color.ui=always clean -i |
+ test_terminal env TERM=vt100 git clean -i |
test_decode_color |
head -n 1 >header &&
# not i18ngrep