glib/tests: skip test that aborts with plain Windows UCRT

setlocale() asserts on LC_MESSAGES:
minkernel\crts\ucrt\src\appcrt\locale\wsetlocale.cpp(448) : Assertion failed: LC_MIN <= _category && _category <= LC_MAX

https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale
https://developercommunity.visualstudio.com/t/setlocale-assert-on-invalid-category/1646244

(apparently, MinGW wraps or reimplements the call)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2022-01-25 12:07:33 +04:00
parent 9e9e323a2d
commit 6d21ff6305

View File

@ -2365,6 +2365,9 @@ check_and_set_locale (int category,
static void
test_format_time_mixed_utf8 (gconstpointer data)
{
#ifdef _MSC_VER
g_test_skip ("setlocale (LC_MESSAGES) asserts on ucrt");
#else
const MixedUtf8TestData *test_data;
gchar *old_time_locale;
gchar *old_messages_locale;
@ -2430,6 +2433,7 @@ test_format_time_mixed_utf8 (gconstpointer data)
setlocale (LC_MESSAGES, old_messages_locale);
g_free (old_time_locale);
g_free (old_messages_locale);
#endif
}
#pragma GCC diagnostic push