Updated tests to reflect recent fixes.

Fixed a problem where some invalid expressions would either be accepted, or worse crash.
Changed error code for unsupported lookbehind assertions.


[SVN r31350]
This commit is contained in:
John Maddock
2005-10-16 18:12:59 +00:00
parent 15504c263f
commit d79fe676e9
4 changed files with 70 additions and 3 deletions

View File

@ -765,7 +765,7 @@ void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state)
{
// Oops error:
if(0 == this->m_pdata->m_status) // update the error code if not already set
this->m_pdata->m_status = boost::regex_constants::error_brack;
this->m_pdata->m_status = boost::regex_constants::error_bad_pattern;
//
// clear the expression, we should be empty:
//
@ -776,8 +776,8 @@ void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state)
//
if(0 == (this->flags() & regex_constants::no_except))
{
std::string message = this->m_pdata->m_ptraits->error_string(boost::regex_constants::error_brack);
boost::regex_error e(message, boost::regex_constants::error_brack, 0);
std::string message = this->m_pdata->m_ptraits->error_string(boost::regex_constants::error_bad_pattern);
boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
e.raise();
}
}