Skip to content

Commit 4b7f945

Browse files
author
Denis Hananein
committed
Support kitty TERM
Signed-off-by: Denis Hananein <i@zloylos.me>
1 parent e07617d commit 4b7f945

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

googletest/src/gtest.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3257,6 +3257,7 @@ bool ShouldUseColor(bool stdout_is_tty) {
32573257
const bool term_supports_color = term != nullptr && (
32583258
String::CStringEquals(term, "xterm") ||
32593259
String::CStringEquals(term, "xterm-color") ||
3260+
String::CStringEquals(term, "xterm-kitty") ||
32603261
String::CStringEquals(term, "screen") ||
32613262
String::CStringEquals(term, "tmux") ||
32623263
String::CStringEquals(term, "rxvt-unicode") ||

googletest/test/googletest-color-test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def testNoEnvVarNoFlag(self):
7878
self.assert_(UsesColor('cygwin', None, None))
7979
self.assert_(UsesColor('xterm', None, None))
8080
self.assert_(UsesColor('xterm-color', None, None))
81+
self.assert_(UsesColor('xterm-kitty', None, None))
8182
self.assert_(UsesColor('xterm-256color', None, None))
8283

8384
def testFlagOnly(self):

googletest/test/gtest_unittest.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6636,6 +6636,9 @@ TEST(ColoredOutputTest, UsesColorsWhenTermSupportsColors) {
66366636
SetEnv("TERM", "xterm-color"); // TERM supports colors.
66376637
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
66386638

6639+
SetEnv("TERM", "xterm-kitty"); // TERM supports colors.
6640+
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
6641+
66396642
SetEnv("TERM", "xterm-256color"); // TERM supports colors.
66406643
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
66416644

0 commit comments

Comments
 (0)