From ca62874515f2254923a52e02444d77485f878f62 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Fri, 17 Jul 2015 20:07:36 -0400 Subject: [PATCH] Test: Added find() offset case-insensitive tests --- test/text.t.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/text.t.cpp b/test/text.t.cpp index d4894d6ab..497a49ff5 100644 --- a/test/text.t.cpp +++ b/test/text.t.cpp @@ -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");