diff options
author | Ian Boros <puppyofkosh@gmail.com> | 2019-02-27 11:22:38 -0500 |
---|---|---|
committer | Ian Boros <puppyofkosh@gmail.com> | 2019-02-27 16:14:48 -0500 |
commit | 282091aa51aa04eb42da6a5f30e693595ef2cb46 (patch) | |
tree | f2599a826640065bcd7ca88cdf5f5acf4cecb295 /src/third_party | |
parent | b3bd75fc2f404931729e0c00992053b03859f817 (diff) | |
download | mongo-282091aa51aa04eb42da6a5f30e693595ef2cb46.tar.gz |
SERVER-39693 fix PCRE support for start option (*LF)
Diffstat (limited to 'src/third_party')
-rw-r--r-- | src/third_party/pcre-8.42/pcrecpp.cc | 1 | ||||
-rw-r--r-- | src/third_party/pcre-8.42/pcrecpp_unittest.cc | 7 |
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 |