forked from boostorg/regex
Added tests for deprecated and POSIX functions.
[SVN r22805]
This commit is contained in:
1 parent
bb264b055f
commit
03694d72ae
14 files changed
+466
-136
No files matched your search
+9
-1
@@ -66,7 +66,10 @@ BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA* expression, const char
|
||||
}
|
||||
|
||||
if(f & REG_NOSUB)
|
||||
{
|
||||
expression->eflags |= match_any;
|
||||
flags |= regex::nosubs;
|
||||
}
|
||||
|
||||
if(f & REG_NOSPEC)
|
||||
flags |= regex::literal;
|
||||
@@ -92,7 +95,12 @@ BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA* expression, const char
|
||||
expression->re_nsub = static_cast<regex*>(expression->guts)->mark_count() - 1;
|
||||
result = static_cast<regex*>(expression->guts)->error_code();
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
} catch(...)
|
||||
}
|
||||
catch(const boost::bad_expression& be)
|
||||
{
|
||||
result = be.errorno();
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
result = REG_E_UNKNOWN;
|
||||
}
|
||||
|
||||
@@ -92,12 +92,12 @@ BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_error_string(regex_con
|
||||
"Invalid regular expression", /* REG_BADPAT */
|
||||
"Invalid collation character", /* REG_ECOLLATE */
|
||||
"Invalid character class name", /* REG_ECTYPE */
|
||||
"Trailing backslash", /* REG_EESCAPE */
|
||||
"Invalid or trailing backslash", /* REG_EESCAPE */
|
||||
"Invalid back reference", /* REG_ESUBREG */
|
||||
"Unmatched [ or [^", /* REG_EBRACK */
|
||||
"Unmatched ( or \\(", /* REG_EPAREN */
|
||||
"Unmatched { or \\{", /* REG_EBRACE */
|
||||
"Invalid content of \\{\\}", /* REG_BADBR */
|
||||
"Invalid content of repeat range", /* REG_BADBR */
|
||||
"Invalid range end", /* REG_ERANGE */
|
||||
"Memory exhausted", /* REG_ESPACE */
|
||||
"Invalid preceding regular expression", /* REG_BADRPT */
|
||||
|
||||
@@ -74,7 +74,10 @@ BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW* expression, const wcha
|
||||
}
|
||||
|
||||
if(f & REG_NOSUB)
|
||||
{
|
||||
expression->eflags |= match_any;
|
||||
flags |= wregex::nosubs;
|
||||
}
|
||||
|
||||
if(f & REG_NOSPEC)
|
||||
flags |= wregex::literal;
|
||||
@@ -100,7 +103,12 @@ BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW* expression, const wcha
|
||||
expression->re_nsub = static_cast<wregex*>(expression->guts)->mark_count() - 1;
|
||||
result = static_cast<wregex*>(expression->guts)->error_code();
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
} catch(...)
|
||||
}
|
||||
catch(const boost::bad_expression& be)
|
||||
{
|
||||
result = be.errorno();
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
result = REG_E_UNKNOWN;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user