forked from boostorg/regex
@ -73,7 +73,7 @@ void compare_result(const MR1& w1, const MR2& w2, boost::mpl::int_<2> const*)
|
||||
typedef typename MR2::value_type MR2_value_type;
|
||||
typedef typename MR2_value_type::const_iterator MR2_iterator_type;
|
||||
typedef boost::u16_to_u32_iterator<MR2_iterator_type> iterator_type;
|
||||
typedef typename MR1::size_type size_type;
|
||||
//typedef typename MR1::size_type size_type;
|
||||
if(w1.size() != w2.size())
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR("Size mismatch in match_results class", UChar32);
|
||||
@ -103,7 +103,7 @@ void compare_result(const MR1& w1, const MR2& w2, boost::mpl::int_<1> const*)
|
||||
typedef typename MR2::value_type MR2_value_type;
|
||||
typedef typename MR2_value_type::const_iterator MR2_iterator_type;
|
||||
typedef boost::u8_to_u32_iterator<MR2_iterator_type> iterator_type;
|
||||
typedef typename MR1::size_type size_type;
|
||||
//typedef typename MR1::size_type size_type;
|
||||
if(w1.size() != w2.size())
|
||||
{
|
||||
BOOST_REGEX_TEST_ERROR("Size mismatch in match_results class", UChar32);
|
||||
@ -358,7 +358,7 @@ void test_icu(const wchar_t&, const test_regex_search_tag& )
|
||||
|
||||
void test_icu(const wchar_t&, const test_invalid_regex_tag&)
|
||||
{
|
||||
typedef boost::u16_to_u32_iterator<std::wstring::const_iterator, ::UChar32> conv_iterator;
|
||||
//typedef boost::u16_to_u32_iterator<std::wstring::const_iterator, ::UChar32> conv_iterator;
|
||||
std::vector< ::UChar32> expression;
|
||||
#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
expression.assign(test_info<wchar_t>::expression().begin(), test_info<wchar_t>::expression().end());
|
||||
|
@ -422,7 +422,7 @@ private:
|
||||
template<class charT, class traits>
|
||||
void test_regex_grep(boost::basic_regex<charT, traits>& r)
|
||||
{
|
||||
typedef typename std::basic_string<charT>::const_iterator const_iterator;
|
||||
//typedef typename std::basic_string<charT>::const_iterator const_iterator;
|
||||
const std::basic_string<charT>& search_text = test_info<charT>::search_text();
|
||||
boost::regex_constants::match_flag_type opts = test_info<charT>::match_options();
|
||||
const int* answer_table = test_info<charT>::answer_table();
|
||||
|
@ -179,21 +179,20 @@ void test_simple_repeats2()
|
||||
{
|
||||
using namespace boost::regex_constants;
|
||||
|
||||
TEST_INVALID_REGEX("a{}", perl);
|
||||
TEST_INVALID_REGEX("a{", perl);
|
||||
TEST_INVALID_REGEX("a{1", perl);
|
||||
TEST_INVALID_REGEX("a{1,", perl);
|
||||
TEST_INVALID_REGEX("a{1,2", perl);
|
||||
TEST_INVALID_REGEX("a{ 1 , 2 ", perl);
|
||||
TEST_INVALID_REGEX("a{ }", perl);
|
||||
TEST_INVALID_REGEX("a}", perl);
|
||||
TEST_REGEX_SEARCH("a{}", basic, "a{}", match_default, make_array(0, 3, -2, -2));
|
||||
TEST_REGEX_SEARCH("a{", basic, "a{", match_default, make_array(0, 2, -2, -2));
|
||||
TEST_REGEX_SEARCH("a{1", basic, "a{1", match_default, make_array(0, 3, -2, -2));
|
||||
TEST_REGEX_SEARCH("a{1,", basic, "a{1,", match_default, make_array(0, 4, -2, -2));
|
||||
TEST_REGEX_SEARCH("a{1,2", basic, "a{1,2", match_default, make_array(0, 5, -2, -2));
|
||||
TEST_REGEX_SEARCH("a{ 1 , 2", basic, "a{ 1 , 2", match_default, make_array(0, 8, -2, -2));
|
||||
TEST_REGEX_SEARCH("a{ }", basic, "a{ }", match_default, make_array(0, 4, -2, -2));
|
||||
TEST_REGEX_SEARCH("a}", basic, "a}", match_default, make_array(0, 2, -2, -2));
|
||||
TEST_INVALID_REGEX("{1}", perl);
|
||||
TEST_INVALID_REGEX("a{b}", perl);
|
||||
TEST_INVALID_REGEX("a{1b}", perl);
|
||||
TEST_INVALID_REGEX("a{1,b}", perl);
|
||||
TEST_INVALID_REGEX("a{1,2v}", perl);
|
||||
TEST_REGEX_SEARCH("a{b}", basic, "a{b}", match_default, make_array(0, 4, -2, -2));
|
||||
TEST_REGEX_SEARCH("a{1b", basic, "a{1b", match_default, make_array(0, 4, -2, -2));
|
||||
TEST_REGEX_SEARCH("a{1,b}", basic, "a{1,b}", match_default, make_array(0, 6, -2, -2));
|
||||
TEST_REGEX_SEARCH("a{1,2v}", basic, "a{1,2v}", match_default, make_array(0, 7, -2, -2));
|
||||
TEST_INVALID_REGEX("a{2,1}", perl);
|
||||
|
||||
// now try operator \\{\\} for POSIX basic regexes
|
||||
TEST_REGEX_SEARCH("a\\{2\\}", basic, "a", match_default, make_array(-2, -2));
|
||||
TEST_REGEX_SEARCH("a\\{2\\}", basic|no_intervals, "a{2}", match_default, make_array(0, 4, -2, -2));
|
||||
|
Reference in New Issue
Block a user