]> git.saurik.com Git - wxWidgets.git/commitdiff
added test for Lower()/Upper() with 8bit chars
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 28 Jun 2004 10:46:07 +0000 (10:46 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 28 Jun 2004 10:46:07 +0000 (10:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/strings/strings.cpp

index fa633e6861a57f707b6b23d12a76582648be4f30..d8dc4fa3c2cccb6402c22d702acd9915c80fabee 100644 (file)
@@ -323,4 +323,17 @@ void StringTestCase::CaseChanges()
     CPPUNIT_ASSERT( s1l == _T("hello!") );
     CPPUNIT_ASSERT( s2u == wxEmptyString );
     CPPUNIT_ASSERT( s2l == wxEmptyString );
+
+#if !wxUSE_UNICODE
+    wxLocale locRu(wxLANGUAGE_RUSSIAN, 0 /* flags */);
+    if ( locRu.IsOk() )
+    {
+        // try upper casing 8bit strings
+        wxString sUpper("\xdf"),
+                 sLower("\xff");
+
+        CPPUNIT_ASSERT( sUpper.Lower() == sLower );
+        CPPUNIT_ASSERT( sLower.Upper() == sUpper );
+    }
+#endif // !wxUSE_UNICODE
 }