Fixed test program after changes to regex_match code.

[SVN r14111]
This commit is contained in:
John Maddock
2002-06-08 10:37:47 +00:00
parent b2c4abc9cf
commit de40dac5d1

View File

@ -594,7 +594,12 @@ void cpp_hl_tests(RegEx& e, bool recurse = true)
}
}
if((matches[0] == 0) && (e.Match(search_text.c_str(), flags[3])))
//
// test RegEx::Match only if we expect to match all of the input:
//
if((matches[0] == 0) && (matches[1] == search_text.size()))
{
if(e.Match(search_text.c_str(), flags[3]))
{
unsigned int i = 0;
unsigned int j = 0;
@ -610,6 +615,12 @@ void cpp_hl_tests(RegEx& e, bool recurse = true)
j += 2;
}
}
else
{
begin_error();
cout << "Match expected but not found with RegEx::Match" << endl;
}
}
}
}
#endif