Added tests for deprecated and POSIX functions.

[SVN r22805]
This commit is contained in:
John Maddock committed 2004-05-12 12:13:49 +00:00
1 parent bb264b055f
commit 03694d72ae
14 files changed
+466 -136

No files matched your search

+9 -1
View File
@@ -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;
}
+2 -2
View File
@@ -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 */
+9 -1
View File
@@ -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;
}