+
+ // 0 1 2
+ // 0123456 78901234567 8901234567
+ //wxString _s1 = _T("abcdefg\0ABCDEFGabc\0ABCabcABC");
+ //wxString _s2 = _T("g\0AB");
+ wxString _s1 = _T("abcdefgABCDEFGabcABCabcABC");
+ wxString _s2 = _T("gAB");
+
+ _s1.insert(7, 1, '\0');
+ _s1.insert(18, 1, '\0');
+ _s2.insert(1, 1, '\0');
+
+ CPPUNIT_ASSERT( _s1.find(_T('A')) == 8u );
+ CPPUNIT_ASSERT( _s1.find(_T('A'), 8) == 8u );
+ CPPUNIT_ASSERT( _s1.find(_T('Z')) == wxString::npos );
+ CPPUNIT_ASSERT( _s1.find(_T('C'), 22) == 27u );
+
+ CPPUNIT_ASSERT( _s1.find(_T("AB")) == 8u );
+ CPPUNIT_ASSERT( _s1.find(_T("AB"), 26) == wxString::npos );
+ CPPUNIT_ASSERT( _s1.find(_T("AB"), 23) == 25u );
+
+ CPPUNIT_ASSERT( _s1.find(_T("ABZZZ"), 2, 2) == 8u );
+ CPPUNIT_ASSERT( _s1.find(_T("ABZZZ"), 26, 2) == wxString::npos );
+
+ CPPUNIT_ASSERT( _s1.find(_s2) == 6u );
+ CPPUNIT_ASSERT( _s1.find(_s2, 7) == wxString::npos );
+ CPPUNIT_ASSERT( _s1.find(_s2, 6) == 6u );