summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-06-09 05:38:14 (GMT)
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-06-09 05:38:14 (GMT)
commitfd36c200f446aaada1a1f0b026f2d742d4b2fa5a (patch)
tree5956969c199faf87dd4a9636b980dab0d42643bb /src
parent1bd424d9608d85fc6b705a2370ed86db3118dcf6 (diff)
downloadgoogletest-fd36c200f446aaada1a1f0b026f2d742d4b2fa5a.zip
googletest-fd36c200f446aaada1a1f0b026f2d742d4b2fa5a.tar.gz
googletest-fd36c200f446aaada1a1f0b026f2d742d4b2fa5a.tar.bz2
Adds support for xterm-256color (by Michihiro Kuramochi).
Diffstat (limited to 'src')
-rw-r--r--src/gtest.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gtest.cc b/src/gtest.cc
index 6fc4044..c093bce 100644
--- a/src/gtest.cc
+++ b/src/gtest.cc
@@ -183,7 +183,7 @@ GTEST_DEFINE_string_(
"Whether to use colors in the output. Valid values: yes, no, "
"and auto. 'auto' means to use colors if the output is "
"being sent to a terminal and the TERM environment variable "
- "is set to xterm or xterm-color.");
+ "is set to xterm, xterm-color, xterm-256color or cygwin.");
GTEST_DEFINE_string_(
filter,
@@ -2518,6 +2518,7 @@ bool ShouldUseColor(bool stdout_is_tty) {
const bool term_supports_color =
String::CStringEquals(term, "xterm") ||
String::CStringEquals(term, "xterm-color") ||
+ String::CStringEquals(term, "xterm-256color") ||
String::CStringEquals(term, "cygwin");
return stdout_is_tty && term_supports_color;
#endif // GTEST_OS_WINDOWS