test wxString::Mid() with non-ASCII strings

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-05-10 11:34:32 +00:00
parent 564ab31a53
commit 478cbb089e

View File

@@ -186,6 +186,14 @@ void StringTestCase::Extraction()
CPPUNIT_ASSERT( wxStrcmp( s.substr(3, 5).c_str() , _T("lo, w") ) == 0 );
CPPUNIT_ASSERT( wxStrcmp( s.substr(3).c_str() , _T("lo, world!") ) == 0 );
#if wxUSE_UNICODE
static const char *germanUTF8 = "Oberfl\303\244che";
wxString strUnicode(wxString::FromUTF8(germanUTF8));
CPPUNIT_ASSERT( strUnicode.Mid(0, 10) == strUnicode );
CPPUNIT_ASSERT( strUnicode.Mid(7, 2) == "ch" );
#endif // wxUSE_UNICODE
wxString rest;
#define TEST_STARTS_WITH(prefix, correct_rest, result) \