setup_pager: set GIT_PAGER_IN_USE
[gitweb.git] / t / t7006-pager.sh
index 2ac729f40c730746d799a3c02c4f86ddb89cae57..4884e1b40c8a40e549f877493643296a9b0855e0 100755 (executable)
@@ -181,6 +181,17 @@ test_expect_success 'color when writing to a file intended for a pager' '
        colorful colorful.log
 '
 
+test_expect_success TTY 'colors are sent to pager for external commands' '
+       test_config alias.externallog "!git log" &&
+       test_config color.ui auto &&
+       (
+               TERM=vt100 &&
+               export TERM &&
+               test_terminal git -p externallog
+       ) &&
+       colorful paginated.out
+'
+
 # Use this helper to make it easy for the caller of your
 # terminal-using function to specify whether it should fail.
 # If you write