summaryrefslogtreecommitdiffstats
path: root/googletest/src
diff options
context:
space:
mode:
authorCopybara-Service <copybara-worker@google.com>2022-11-14 22:06:58 (GMT)
committerCopybara-Service <copybara-worker@google.com>2022-11-14 22:06:58 (GMT)
commit0e6aac2571eb1753b8855d8d1f592df64d1a4828 (patch)
treebb9cbc785891d214034adbdc8194fe9beb375ce3 /googletest/src
parent42c6f57f3ca08b86f4aa0fbdb705f12c6d9c3066 (diff)
parent4b7f9453c5fbb0614cec13565ff98ab87aa83fbe (diff)
downloadgoogletest-0e6aac2571eb1753b8855d8d1f592df64d1a4828.zip
googletest-0e6aac2571eb1753b8855d8d1f592df64d1a4828.tar.gz
googletest-0e6aac2571eb1753b8855d8d1f592df64d1a4828.tar.bz2
Merge pull request #4058 from zloylos:support-kitty-term
PiperOrigin-RevId: 488463135 Change-Id: I4180d766dabbe438210904e743e6e963122540f5
Diffstat (limited to 'googletest/src')
-rw-r--r--googletest/src/gtest.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index 7669d22..d01cbd5 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -3252,15 +3252,16 @@ bool ShouldUseColor(bool stdout_is_tty) {
#else
// On non-Windows platforms, we rely on the TERM variable.
const char* const term = posix::GetEnv("TERM");
- const bool term_supports_color = term != nullptr && (
- String::CStringEquals(term, "xterm") ||
- String::CStringEquals(term, "xterm-color") ||
- String::CStringEquals(term, "screen") ||
- String::CStringEquals(term, "tmux") ||
- String::CStringEquals(term, "rxvt-unicode") ||
- String::CStringEquals(term, "linux") ||
- String::CStringEquals(term, "cygwin") ||
- String::EndsWithCaseInsensitive(term, "-256color"));
+ const bool term_supports_color =
+ term != nullptr && (String::CStringEquals(term, "xterm") ||
+ String::CStringEquals(term, "xterm-color") ||
+ String::CStringEquals(term, "xterm-kitty") ||
+ String::CStringEquals(term, "screen") ||
+ String::CStringEquals(term, "tmux") ||
+ String::CStringEquals(term, "rxvt-unicode") ||
+ String::CStringEquals(term, "linux") ||
+ String::CStringEquals(term, "cygwin") ||
+ String::EndsWithCaseInsensitive(term, "-256color"));
return stdout_is_tty && term_supports_color;
#endif // GTEST_OS_WINDOWS
}