From 46c7b8e6d575b6473a42d4e37618a2c227d7a793 Mon Sep 17 00:00:00 2001 From: Chris Kennelly Date: Sat, 29 Aug 2026 15:54:42 -0700 Subject: [PATCH] Fix regex forward slash escaping in logging_test.cc. Remove unneeded backslash escapes before forward slashes in MatchesRegex pattern strings to ensure compatibility with standard GTest regex engines. PiperOrigin-RevId: 973223136 --- tcmalloc/internal/logging_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcmalloc/internal/logging_test.cc b/tcmalloc/internal/logging_test.cc index 0928d856e..9c5480885 100644 --- a/tcmalloc/internal/logging_test.cc +++ b/tcmalloc/internal/logging_test.cc @@ -50,13 +50,13 @@ TEST(InternalLogging, MessageFormatting) { TC_LOG("Hello int=%d str=%s", 42, "bar"); EXPECT_THAT(*log_buffer, testing::MatchesRegex( - "[0-9]+ .*tcmalloc\\/internal/logging_test\\.cc:[0-9]+\\] " + "[0-9]+ .*tcmalloc/internal/logging_test\\.cc:[0-9]+\\] " "Hello int=42 str=bar\\n")); TC_LOG("Long string: %s", long_string.c_str()); EXPECT_THAT(*log_buffer, testing::MatchesRegex( - "[0-9]+ .*tcmalloc\\/internal/logging_test\\.cc:[0-9]+\\] " + "[0-9]+ .*tcmalloc/internal/logging_test\\.cc:[0-9]+\\] " "Long string: the quick brown fox jumped over the lazy " "dogthe quick brown fox jumped over the lazy dog.*"));