summaryrefslogtreecommitdiff
path: root/src/third_party
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party')
-rw-r--r--src/third_party/pcre-8.42/pcrecpp.cc1
-rw-r--r--src/third_party/pcre-8.42/pcrecpp_unittest.cc7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/third_party/pcre-8.42/pcrecpp.cc b/src/third_party/pcre-8.42/pcrecpp.cc
index 77a2fedc4be..1147d01108a 100644
--- a/src/third_party/pcre-8.42/pcrecpp.cc
+++ b/src/third_party/pcre-8.42/pcrecpp.cc
@@ -90,6 +90,7 @@ static const char *start_options[] = {
"(*NO_AUTO_POSSESS)",
"(*LIMIT_RECURSION=",
"(*LIMIT_MATCH=",
+ "(*LF)",
"(*CRLF)",
"(*CR)",
"(*BSR_UNICODE)",
diff --git a/src/third_party/pcre-8.42/pcrecpp_unittest.cc b/src/third_party/pcre-8.42/pcrecpp_unittest.cc
index 10cb8ecabf5..269f179c5ac 100644
--- a/src/third_party/pcre-8.42/pcrecpp_unittest.cc
+++ b/src/third_party/pcre-8.42/pcrecpp_unittest.cc
@@ -1231,6 +1231,13 @@ int main(int argc, char** argv) {
RE re_test("");
CHECK(!re_test.FullMatch(utf8_string));
}
+
+ {
+ // Test where only a \n indicates newline.
+ RE re_test("(*LF)a.b");
+ CHECK(!re_test.FullMatch("a\nb"));
+ CHECK(re_test.FullMatch("a\rb"));
+ }
// </Added by MongoDB>
// Check that '.' matches one byte or UTF-8 character