[glib: 2/6] glib/tests: skip some tests if langinfo isn't available
- From: Nirbheek Chauhan <nirbheekc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 2/6] glib/tests: skip some tests if langinfo isn't available
- Date: Thu, 10 Feb 2022 09:43:27 +0000 (UTC)
commit 2761e134461b93956df823e4c48df7696d65bcee
Author: Marc-André Lureau <marcandre lureau redhat com>
Date: Tue Jan 25 00:48:52 2022 +0400
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>
glib/tests/gdatetime.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
index 3c2796847..6714d2e32 100644
--- a/glib/tests/gdatetime.c
+++ b/glib/tests/gdatetime.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]