summaryrefslogtreecommitdiffstats
path: root/googletest
diff options
context:
space:
mode:
authorEnji Cooper <yaneurabeya@gmail.com>2023-08-08 04:36:44 (GMT)
committerEnji Cooper <yaneurabeya@gmail.com>2023-08-08 04:37:54 (GMT)
commit77485ff0046136f89f14d5e7a51e98849dc00691 (patch)
treec086b003651a530d97b0402b48e7a255556e8071 /googletest
parent6abc9e3d791ecac53361832bc4c14b6203daff4b (diff)
downloadgoogletest-77485ff0046136f89f14d5e7a51e98849dc00691.zip
googletest-77485ff0046136f89f14d5e7a51e98849dc00691.tar.gz
googletest-77485ff0046136f89f14d5e7a51e98849dc00691.tar.bz2
Fix RETest/1.ImplicitConstructorWorks on non-ABSL platformsrefs/pull/4334/head
The last regular expression specified in the test is not technically POSIX compatible. Use `[[:alnum:]_]` instead of `\w+`; the latter is a Perl-compatible regular expression. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
Diffstat (limited to 'googletest')
-rw-r--r--googletest/test/googletest-port-test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/googletest/test/googletest-port-test.cc b/googletest/test/googletest-port-test.cc
index 32a2a7b..e0793ba 100644
--- a/googletest/test/googletest-port-test.cc
+++ b/googletest/test/googletest-port-test.cc
@@ -418,8 +418,8 @@ TYPED_TEST(RETest, ImplicitConstructorWorks) {
const RE simple(TypeParam("hello"));
EXPECT_STREQ("hello", simple.pattern());
- const RE normal(TypeParam(".*(\\w+)"));
- EXPECT_STREQ(".*(\\w+)", normal.pattern());
+ const RE normal(TypeParam(".*([[:alnum:]_]+)"));
+ EXPECT_STREQ(".*([[:alnum:]_]+)", normal.pattern());
}
// Tests that RE's constructors reject invalid regular expressions.