Test: Added find() offset case-insensitive tests

This commit is contained in:
Paul Beckingham 2015-07-17 20:07:36 -04:00
parent 47970ab166
commit ca62874515

View file

@ -37,7 +37,7 @@ Context context;
////////////////////////////////////////////////////////////////////////////////
int main (int argc, char** argv)
{
UnitTest t (222);
UnitTest t (224);
// Ensure environment has no influence.
unsetenv ("TASKDATA");
@ -357,6 +357,9 @@ int main (int argc, char** argv)
t.is ((int) find ("one two three", "e", 3, true), (int) 11, "offset obeyed");
t.is ((int) find ("one two three", "e", 11, true), (int) 11, "offset obeyed");
t.is ((int) find ("one two three", "e", 3, false), (int) 11, "offset obeyed");
t.is ((int) find ("one two three", "e", 11, false), (int) 11, "offset obeyed");
// int strippedLength (const std::string&);
t.is (strippedLength (std::string ("")), 0, "strippedLength -> 0");
t.is (strippedLength (std::string ("abc")), 3, "strippedLength abc -> 3");