forked from boostorg/regex
Merge collected bug fixes from Trunk:
Refs #589. Refs #7032. Refs #7084. Refs #6346. [SVN r79556]
This commit is contained in:
@ -48,6 +48,10 @@ void test_empty(boost::basic_regex<charT, traits>& r)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR("Invalid value returned from basic_regex<>::status().", charT);
|
||||
}
|
||||
if(r.begin() != r.end())
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR("Invalid value returned from basic_regex<>::begin().", charT);
|
||||
}
|
||||
}
|
||||
|
||||
template<class charT, class traits>
|
||||
|
@ -482,6 +482,10 @@ void test(boost::basic_regex<charT, traits>& r, const test_regex_search_tag&)
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR("Expression did not compile when it should have done, error code = " << r.status(), charT);
|
||||
}
|
||||
if(expression != std::basic_string<charT>(r.begin(), r.end()))
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR("Stored expression string was incorrect", charT);
|
||||
}
|
||||
test_simple_search(r);
|
||||
test_regex_iterator(r);
|
||||
test_regex_token_iterator(r);
|
||||
|
@ -190,5 +190,9 @@ void test_replace()
|
||||
TEST_REGEX_REPLACE("(?:(?<one>a)|(?<one>b))", perl, " ...b,,", match_default, "$1.$2.$+{one}", " ....b.b,,");
|
||||
TEST_REGEX_REPLACE("(?:(?<one>a)(?<one>b))", perl, " ...ab,,", match_default, "$1.$2.$+{one}", " ...a.b.a,,");
|
||||
|
||||
// See https://svn.boost.org/trac/boost/ticket/589
|
||||
TEST_REGEX_REPLACE("(a*)", perl, "aabb", match_default, "{$1}", "{aa}{}b{}b{}");
|
||||
TEST_REGEX_REPLACE("(a*)", extended, "aabb", match_default, "{$1}", "{aa}{}b{}b{}");
|
||||
TEST_REGEX_REPLACE("(a*)", extended, "aabb", match_default|match_posix, "{$1}", "{aa}b{}b{}");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user