|
|
@ -6264,8 +6264,17 @@ TEST(ColoredOutputTest, UsesColorsWhenTermSupportsColors) { |
|
|
|
SetEnv("TERM", "xterm-color"); // TERM supports colors.
|
|
|
|
SetEnv("TERM", "xterm-color"); // TERM supports colors.
|
|
|
|
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
|
|
|
|
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetEnv("TERM", "xterm-256color"); // TERM supports colors.
|
|
|
|
|
|
|
|
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetEnv("TERM", "screen"); // TERM supports colors.
|
|
|
|
|
|
|
|
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
|
|
|
|
|
|
|
|
|
|
|
|
SetEnv("TERM", "linux"); // TERM supports colors.
|
|
|
|
SetEnv("TERM", "linux"); // TERM supports colors.
|
|
|
|
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
|
|
|
|
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetEnv("TERM", "cygwin"); // TERM supports colors.
|
|
|
|
|
|
|
|
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
|
|
|
|
#endif // GTEST_OS_WINDOWS
|
|
|
|
#endif // GTEST_OS_WINDOWS
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|