Merge pull request #4490 from memdo:main
PiperOrigin-RevId: 616931521
Change-Id: Iffbb24e3f9add4e7acf8f1988a03afc8628b0733
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index d4292ae..36f4a2d 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -3270,6 +3270,7 @@
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") ||
@@ -4437,8 +4438,8 @@
Message attributes;
for (int i = 0; i < result.test_property_count(); ++i) {
const TestProperty& property = result.GetTestProperty(i);
- attributes << " " << property.key() << "="
- << "\"" << EscapeXmlAttribute(property.value()) << "\"";
+ attributes << " " << property.key() << "=" << "\""
+ << EscapeXmlAttribute(property.value()) << "\"";
}
return attributes.GetString();
}
@@ -4748,9 +4749,7 @@
if (part.failed()) {
*stream << ",\n";
if (++failures == 1) {
- *stream << kIndent << "\""
- << "failures"
- << "\": [\n";
+ *stream << kIndent << "\"" << "failures" << "\": [\n";
}
const std::string location =
internal::FormatCompilerIndependentFileLocation(part.file_name(),
@@ -4900,8 +4899,8 @@
for (int i = 0; i < result.test_property_count(); ++i) {
const TestProperty& property = result.GetTestProperty(i);
attributes << ",\n"
- << indent << "\"" << property.key() << "\": "
- << "\"" << EscapeJson(property.value()) << "\"";
+ << indent << "\"" << property.key() << "\": " << "\""
+ << EscapeJson(property.value()) << "\"";
}
return attributes.GetString();
}
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 @@
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..5d7cfb0 100644
--- a/googletest/test/gtest_unittest.cc
+++ b/googletest/test/gtest_unittest.cc
@@ -4172,8 +4172,8 @@
#endif
TEST(AssertionSyntaxTest, NoFatalFailureAssertionsBehavesLikeSingleStatement) {
if (AlwaysFalse())
- EXPECT_NO_FATAL_FAILURE(FAIL()) << "This should never be executed. "
- << "It's a compilation test only.";
+ EXPECT_NO_FATAL_FAILURE(FAIL())
+ << "This should never be executed. " << "It's a compilation test only.";
else
; // NOLINT
@@ -6671,6 +6671,9 @@
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.
@@ -6695,7 +6698,7 @@
SetEnv("TERM", "linux"); // TERM supports colors.
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
- SetEnv("TERM", "cygwin"); // TERM supports colors.
+ SetEnv("TERM", "cygwin"); // TERM supports colors.
EXPECT_TRUE(ShouldUseColor(true)); // Stdout is a TTY.
#endif // GTEST_OS_WINDOWS
}