diff options
-rw-r--r-- | googletest/src/gtest.cc | 1 | ||||
-rwxr-xr-x | googletest/test/googletest-color-test.py | 1 | ||||
-rw-r--r-- | googletest/test/gtest_unittest.cc | 3 |
3 files changed, 5 insertions, 0 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index d4292ae..63ee78c 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -3270,6 +3270,7 @@ bool ShouldUseColor(bool stdout_is_tty) { term != nullptr && (String::CStringEquals(term, "xterm") || String::CStringEquals(term, "xterm-color") || String::CStringEquals(term, "xterm-kitty") || + String::CStringEquals(term, "alacritty") || String::CStringEquals(term, "screen") || String::CStringEquals(term, "tmux") || String::CStringEquals(term, "rxvt-unicode") || diff --git a/googletest/test/googletest-color-test.py b/googletest/test/googletest-color-test.py index 8926a48..8968cf1 100755 --- a/googletest/test/googletest-color-test.py +++ b/googletest/test/googletest-color-test.py @@ -80,6 +80,7 @@ class GTestColorTest(gtest_test_utils.TestCase): self.assertTrue(UsesColor('xterm', None, None)) self.assertTrue(UsesColor('xterm-color', None, None)) self.assertTrue(UsesColor('xterm-kitty', None, None)) + self.assertTrue(UsesColor('alacritty', None, None)) self.assertTrue(UsesColor('xterm-256color', None, None)) def testFlagOnly(self): diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc index 0b383ea..b699f27 100644 --- a/googletest/test/gtest_unittest.cc +++ b/googletest/test/gtest_unittest.cc @@ -6671,6 +6671,9 @@ TEST(ColoredOutputTest, UsesColorsWhenTermSupportsColors) { SetEnv("TERM", "xterm-kitty"); // TERM supports colors. EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY. + SetEnv("TERM", "alacritty"); // 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. |