diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-06-13 08:53:45 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-06-13 08:53:45 +0000 |
commit | fb6cb91d5a1156bf15b5d3b83b2ac6a8f54c369f (patch) | |
tree | 203a35eb5e866541a010733ff6e0acfe12b09c4b /pcrecpp_unittest.cc | |
parent | cc7768ebfd86be3e6126739dd2c66c76bc197ca1 (diff) | |
download | pcre-fb6cb91d5a1156bf15b5d3b83b2ac6a8f54c369f.tar.gz |
Apply C++ patch to fix a bad optimization.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@179 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcrecpp_unittest.cc')
-rw-r--r-- | pcrecpp_unittest.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pcrecpp_unittest.cc b/pcrecpp_unittest.cc index 858728c..bfe26e5 100644 --- a/pcrecpp_unittest.cc +++ b/pcrecpp_unittest.cc @@ -806,8 +806,11 @@ int main(int argc, char** argv) { /***** FullMatch with no args *****/ CHECK(RE("h.*o").FullMatch("hello")); - CHECK(!RE("h.*o").FullMatch("othello")); - CHECK(!RE("h.*o").FullMatch("hello!")); + CHECK(!RE("h.*o").FullMatch("othello")); // Must be anchored at front + CHECK(!RE("h.*o").FullMatch("hello!")); // Must be anchored at end + CHECK(RE("a*").FullMatch("aaaa")); // Fullmatch with normal op + CHECK(RE("a*?").FullMatch("aaaa")); // Fullmatch with nongreedy op + CHECK(RE("a*?\\z").FullMatch("aaaa")); // Two unusual ops /***** FullMatch with args *****/ |