Add a trivial test for setting default locale

Initializing wxLocale using wxLANGUAGE_DEFAULT should work, unless
LC_ALL is explicitly set to an invalid value.
This commit is contained in:
Vadim Zeitlin
2021-02-28 01:07:47 +01:00
parent 7b6894ea41
commit 5fd85d422f

View File

@@ -226,4 +226,11 @@ void IntlTestCase::IsAvailable()
CPPUNIT_ASSERT_EQUAL( origLocale, setlocale(LC_ALL, NULL) );
}
TEST_CASE("wxLocale::Default", "[locale]")
{
wxLocale loc;
REQUIRE( loc.Init(wxLANGUAGE_DEFAULT, wxLOCALE_DONT_LOAD_DEFAULT) );
}
#endif // wxUSE_INTL