diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2013-03-11 17:52:13 (GMT) |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2013-03-11 17:52:13 (GMT) |
commit | 6b7a167dca7a9007d14fc95a07f4f6e07fec3162 (patch) | |
tree | d46a4c9275cebcbc53bc090075b7e527f80488e4 /src | |
parent | fc01f532a622a7d460a4eff816c56c0e501f20f7 (diff) | |
download | googletest-6b7a167dca7a9007d14fc95a07f4f6e07fec3162.zip googletest-6b7a167dca7a9007d14fc95a07f4f6e07fec3162.tar.gz googletest-6b7a167dca7a9007d14fc95a07f4f6e07fec3162.tar.bz2 |
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 'src')
-rw-r--r-- | src/gtest.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gtest.cc b/src/gtest.cc index 62b6929..911919d 100644 --- a/src/gtest.cc +++ b/src/gtest.cc @@ -204,7 +204,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, xterm-color, xterm-256color, linux or cygwin."); + "is set to a terminal type that supports colors."); GTEST_DEFINE_string_( filter, @@ -2497,6 +2497,7 @@ bool ShouldUseColor(bool stdout_is_tty) { String::CStringEquals(term, "xterm-color") || String::CStringEquals(term, "xterm-256color") || String::CStringEquals(term, "screen") || + String::CStringEquals(term, "screen-256color") || String::CStringEquals(term, "linux") || String::CStringEquals(term, "cygwin"); return stdout_is_tty && term_supports_color; |