Fix RETest/1.ImplicitConstructorWorks on non-ABSL platforms
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>
This commit is contained in:
parent
6abc9e3d79
commit
77485ff004
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user