From 6d21ff6305ab00613a37f8786cbadf1e0f2f0503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 25 Jan 2022 12:07:33 +0400 Subject: [PATCH] glib/tests: skip test that aborts with plain Windows UCRT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- glib/tests/gdatetime.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c index a09ae7ee8..3a7bbb220 100644 --- a/glib/tests/gdatetime.c +++ b/glib/tests/gdatetime.c @@ -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