From 478cbb089e173d035957fa9ba35b439f798fb59c Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 10 May 2007 11:34:32 +0000 Subject: [PATCH] test wxString::Mid() with non-ASCII strings git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/strings/strings.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/strings/strings.cpp b/tests/strings/strings.cpp index e66615565b..94d9d7f113 100644 --- a/tests/strings/strings.cpp +++ b/tests/strings/strings.cpp @@ -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) \ -- 2.45.2