mirror of
https://github.com/google/googletest.git
synced 2025-01-14 00:20:57 +08:00
Support kitty TERM
Signed-off-by: Denis Hananein <i@zloylos.me>
This commit is contained in:
parent
e07617d6c6
commit
4b7f9453c5
@ -3257,6 +3257,7 @@ bool ShouldUseColor(bool stdout_is_tty) {
|
||||
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") ||
|
||||
|
@ -78,6 +78,7 @@ class GTestColorTest(gtest_test_utils.TestCase):
|
||||
self.assert_(UsesColor('cygwin', None, None))
|
||||
self.assert_(UsesColor('xterm', None, None))
|
||||
self.assert_(UsesColor('xterm-color', None, None))
|
||||
self.assert_(UsesColor('xterm-kitty', None, None))
|
||||
self.assert_(UsesColor('xterm-256color', None, None))
|
||||
|
||||
def testFlagOnly(self):
|
||||
|
@ -6636,6 +6636,9 @@ TEST(ColoredOutputTest, UsesColorsWhenTermSupportsColors) {
|
||||
SetEnv("TERM", "xterm-color"); // TERM supports colors.
|
||||
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
|
||||
|
||||
SetEnv("TERM", "xterm-kitty"); // TERM supports colors.
|
||||
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
|
||||
|
||||
SetEnv("TERM", "xterm-256color"); // TERM supports colors.
|
||||
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user