Test: Added find() offset case-insensitive tests
This commit is contained in:
@@ -37,7 +37,7 @@ Context context;
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int main (int argc, char** argv)
|
int main (int argc, char** argv)
|
||||||
{
|
{
|
||||||
UnitTest t (222);
|
UnitTest t (224);
|
||||||
|
|
||||||
// Ensure environment has no influence.
|
// Ensure environment has no influence.
|
||||||
unsetenv ("TASKDATA");
|
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", 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", 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&);
|
// int strippedLength (const std::string&);
|
||||||
t.is (strippedLength (std::string ("")), 0, "strippedLength -> 0");
|
t.is (strippedLength (std::string ("")), 0, "strippedLength -> 0");
|
||||||
t.is (strippedLength (std::string ("abc")), 3, "strippedLength abc -> 3");
|
t.is (strippedLength (std::string ("abc")), 3, "strippedLength abc -> 3");
|
||||||
|
|||||||
Reference in New Issue
Block a user