summaryrefslogtreecommitdiff
path: root/test
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
commit4036e7d55c332d45cfb3f22ed682acce2b8390fd (patch)
treed46a4c9275cebcbc53bc090075b7e527f80488e4 /test
parent74de57c951aedebc5dfe26a27604353432392b98 (diff)
downloadgtest-4036e7d55c332d45cfb3f22ed682acce2b8390fd.tar.gz
gtest-4036e7d55c332d45cfb3f22ed682acce2b8390fd.tar.bz2
gtest-4036e7d55c332d45cfb3f22ed682acce2b8390fd.tar.xz
Supports colored output on term type screen-256color.
Proposed as a one-line patch by Tom Jakubowski (tom@crystae.net); finished by Zhanyong Wan. git-svn-id: http://googletest.googlecode.com/svn/trunk@644 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'test')
-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 f594a44..769b75c 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.