Add a pseudo-test for interactive wxUILocale::FromTag() testing
This allows to easily check whether the given locale is supported.
This commit is contained in:
parent
2c580c9190
commit
3ca3944cff
@ -356,4 +356,20 @@ TEST_CASE("wxUILocale::CompareStrings", "[uilocale]")
|
||||
#endif // wxUSE_UNICODE
|
||||
}
|
||||
|
||||
// Test which can be used to check if the given locale tag is supported.
|
||||
TEST_CASE("wxUILocale::FromTag", "[uilocale][.]")
|
||||
{
|
||||
wxString tag;
|
||||
if ( !wxGetEnv("WX_TEST_LOCALE_TAG", &tag) )
|
||||
{
|
||||
FAIL("Specify WX_TEST_LOCALE_TAG");
|
||||
}
|
||||
|
||||
const wxLocaleIdent locId = wxLocaleIdent::FromTag(tag);
|
||||
REQUIRE( !locId.IsEmpty() );
|
||||
|
||||
const wxUILocale loc(locId);
|
||||
WARN("Locale \"" << tag << "\" supported: " << loc.IsSupported() );
|
||||
}
|
||||
|
||||
#endif // wxUSE_INTL
|
||||
|
Loading…
Reference in New Issue
Block a user