glib/tests: skip some tests if langinfo isn't available

The fallback win32 code doesn't seem to be localized.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2022-01-25 00:48:52 +04:00
parent 60e7430c80
commit 2761e13446

View File

@ -1805,6 +1805,7 @@ test_modifiers (void)
oldlocale = g_strdup (setlocale (LC_ALL, NULL));
setlocale (LC_ALL, "fa_IR.utf-8");
#ifdef HAVE_LANGINFO_OUTDIGIT
if (strstr (setlocale (LC_ALL, NULL), "fa_IR") != NULL)
{
TEST_PRINTF_TIME (23, 0, 0, "%OH", "\333\262\333\263"); /* '23' */
@ -1818,6 +1819,9 @@ test_modifiers (void)
}
else
g_test_skip ("locale fa_IR not available, skipping O modifier tests");
#else
g_test_skip ("langinfo not available, skipping O modifier tests");
#endif
setlocale (LC_ALL, oldlocale);
g_free (oldlocale);
}