Show result of parsing wxLocaleIdent in wxUILocale pseudo test

In addition to showing whether the locale is supported or not, show all
of its components to allow interactively verifying if an identifier is
being parsed correctly.
This commit is contained in:
Vadim Zeitlin 2023-05-19 01:32:32 +02:00
parent 563cc11151
commit d2101ca3be

View file

@ -433,7 +433,15 @@ TEST_CASE("wxUILocale::FromTag", "[.]")
REQUIRE( !locId.IsEmpty() );
const wxUILocale loc(locId);
WARN("Locale \"" << tag << "\" supported: " << loc.IsSupported() );
WARN("Locale \"" << tag << "\":\n"
"language:\t" << locId.GetLanguage() << "\n"
"region:\t" << locId.GetRegion() << "\n"
"script:\t" << locId.GetScript() << "\n"
"charset:\t" << locId.GetCharset() << "\n"
"modifier:\t" << locId.GetModifier() << "\n"
"extension:\t" << locId.GetExtension() << "\n"
"sort order:\t" << locId.GetSortorder() << "\n"
"supported:\t" << (loc.IsSupported() ? "yes" : "no"));
}
namespace