+#if wxUSE_UNICODE
+void CrtTestCase::Strchr()
+{
+ // test that searching for a wide character in a narrow string simply
+ // doesn't find it but doesn't fail with an assert (#11487)
+ const wxUniChar smiley = *wxString::FromUTF8("\xe2\x98\xba").begin();
+
+ CPPUNIT_ASSERT( !wxStrchr("hello", smiley) );
+
+ // but searching for an explicitly wide character does find it
+ CPPUNIT_ASSERT( wxStrchr(wxString::FromUTF8(":-) == \xe2\x98\xba"),
+ static_cast<wchar_t>(smiley)) );
+}
+#endif // wxUSE_UNICODE
+