Supports colored output on term type screen-256color.

Proposed as a one-line patch by Tom Jakubowski (tom@crystae.net);
finished by Zhanyong Wan.
This commit is contained in:
zhanyong.wan
2013-03-11 17:52:13 +00:00
parent fc01f532a6
commit 6b7a167dca
2 changed files with 5 additions and 1 deletions

View File

@@ -6429,6 +6429,9 @@ TEST(ColoredOutputTest, UsesColorsWhenTermSupportsColors) {
SetEnv("TERM", "screen"); // TERM supports colors.
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
SetEnv("TERM", "screen-256color"); // TERM supports colors.
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
SetEnv("TERM", "linux"); // TERM supports colors.
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.