aboutsummaryrefslogtreecommitdiffstats
path: root/test/gtest_unittest.cc
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2013-03-11 17:52:13 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2013-03-11 17:52:13 +0000
commit6b7a167dca7a9007d14fc95a07f4f6e07fec3162 (patch)
treed46a4c9275cebcbc53bc090075b7e527f80488e4 /test/gtest_unittest.cc
parentfc01f532a622a7d460a4eff816c56c0e501f20f7 (diff)
downloadgoogletest-6b7a167dca7a9007d14fc95a07f4f6e07fec3162.tar.gz
googletest-6b7a167dca7a9007d14fc95a07f4f6e07fec3162.tar.bz2
googletest-6b7a167dca7a9007d14fc95a07f4f6e07fec3162.zip
Supports colored output on term type screen-256color.
Proposed as a one-line patch by Tom Jakubowski (tom@crystae.net); finished by Zhanyong Wan.
Diffstat (limited to 'test/gtest_unittest.cc')
-rw-r--r--test/gtest_unittest.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/gtest_unittest.cc b/test/gtest_unittest.cc
index f594a447..769b75c3 100644
--- a/test/gtest_unittest.cc
+++ b/test/gtest_unittest.cc
@@ -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.