mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-08 02:16:17 +01:00
glib/tests: set DE ThreadLocale to fix a test
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
2761e13446
commit
9e9e323a2d
@ -2467,6 +2467,12 @@ static void
|
||||
test_GDateTime_strftime_error_handling (void)
|
||||
{
|
||||
gchar *oldlocale;
|
||||
#ifdef G_OS_WIN32
|
||||
LCID old_lcid;
|
||||
|
||||
old_lcid = GetThreadLocale ();
|
||||
SetThreadLocale (MAKELCID (MAKELANGID (LANG_GERMAN, SUBLANG_GERMAN), SORT_DEFAULT));
|
||||
#endif
|
||||
|
||||
oldlocale = g_strdup (setlocale (LC_ALL, NULL));
|
||||
setlocale (LC_ALL, "de_DE.utf-8");
|
||||
@ -2480,6 +2486,10 @@ test_GDateTime_strftime_error_handling (void)
|
||||
g_test_skip ("locale de_DE not available, skipping error handling tests");
|
||||
setlocale (LC_ALL, oldlocale);
|
||||
g_free (oldlocale);
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
SetThreadLocale (old_lcid);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user