summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorHanhui <sylixos@gmail.com>2019-01-21 08:32:39 (GMT)
committer Hanhui <sylixos@gmail.com>2019-01-21 08:32:39 (GMT)
commit05551554a9ebd7c693f3f75cd6143fd6653c2e5b (patch)
tree0d457af3c2e9b833e051697ffe729661fba9cf03
parentbc37478dbdbbb205f157dc4c0fb55709f8b200ae (diff)
downloadlibgtest-05551554a9ebd7c693f3f75cd6143fd6653c2e5b.zip
libgtest-05551554a9ebd7c693f3f75cd6143fd6653c2e5b.tar.gz
libgtest-05551554a9ebd7c693f3f75cd6143fd6653c2e5b.tar.bz2
SylixOS vt100 terminal support auto color.HEADmaster
-rw-r--r--googletest/googletest/src/gtest.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/googletest/googletest/src/gtest.cc b/googletest/googletest/src/gtest.cc
index 73e9bf8..06652de 100644
--- a/googletest/googletest/src/gtest.cc
+++ b/googletest/googletest/src/gtest.cc
@@ -2964,7 +2964,7 @@ bool ShouldUseColor(bool stdout_is_tty) {
// console there does support colors.
return stdout_is_tty;
#else
- // On non-Windows platforms, we rely on the TERM variable.
+ // On non-Windows platforms, we rely on the TERM variable. (SylixOS Add vt100 support color)
const char* const term = posix::GetEnv("TERM");
const bool term_supports_color =
String::CStringEquals(term, "xterm") ||
@@ -2977,6 +2977,7 @@ bool ShouldUseColor(bool stdout_is_tty) {
String::CStringEquals(term, "rxvt-unicode") ||
String::CStringEquals(term, "rxvt-unicode-256color") ||
String::CStringEquals(term, "linux") ||
+ String::CStringEquals(term, "vt100") ||
String::CStringEquals(term, "cygwin");
return stdout_is_tty && term_supports_color;
#endif // GTEST_OS_WINDOWS