Start adding Perl verb support with FAIL as the first supported verb.

This commit is contained in:
jzmaddock
2015-09-25 19:30:20 +01:00
parent d8c95a9950
commit b557febb0e
9 changed files with 93 additions and 3 deletions

View File

@ -82,6 +82,7 @@ void run_tests()
RUN_TESTS(test_pocessive_repeats);
RUN_TESTS(test_mark_resets);
RUN_TESTS(test_recursion);
RUN_TESTS(test_verbs);
}
int cpp_main(int /*argc*/, char * /*argv*/[])

View File

@ -288,5 +288,6 @@ void test_unicode();
void test_pocessive_repeats();
void test_mark_resets();
void test_recursion();
void test_verbs();
#endif

View File

@ -932,3 +932,11 @@ void test_recursion()
TEST_REGEX_SEARCH("(?:(?<A>a+)|(?<A>b+)|c+)\\.\\k<A>", perl, "cccc.cccc", match_default, make_array(-2, -2));
}
void test_verbs()
{
using namespace boost::regex_constants;
TEST_INVALID_REGEX("a+(*", perl);
TEST_INVALID_REGEX("a+(*FX)", perl);
TEST_REGEX_SEARCH("a+(*FAIL)b", perl, "aaaab", match_default, make_array(-2, -2));
}