Code

color: delay auto-color decision until point of use
[git.git] / t / t7006-pager.sh
index 4884e1b40c8a40e549f877493643296a9b0855e0..458233693bde83ddbd5c9264cf8f9d31401668bb 100755 (executable)
@@ -167,6 +167,18 @@ test_expect_success TTY 'color when writing to a pager' '
        colorful paginated.out
 '
 
+test_expect_success TTY 'colors are suppressed by color.pager' '
+       rm -f paginated.out &&
+       test_config color.ui auto &&
+       test_config color.pager false &&
+       (
+               TERM=vt100 &&
+               export TERM &&
+               test_terminal git log
+       ) &&
+       ! colorful paginated.out
+'
+
 test_expect_success 'color when writing to a file intended for a pager' '
        rm -f colorful.log &&
        test_config color.ui auto ||