From 95f21382c1b5f51d97c04416678861b87e1bac53 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 7 Sep 2021 16:26:11 +0200 Subject: tests: Skip double test if locale isn't available See https://gitlab.gnome.org/GNOME/libgudev/-/merge_requests/19 --- tests/test-double.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test-double.c b/tests/test-double.c index 0092d8b..c518e7a 100644 --- a/tests/test-double.c +++ b/tests/test-double.c @@ -16,6 +16,8 @@ #include +#define GNU_SKIP_RETURNCODE 77 + static void test_double (void) { @@ -54,7 +56,11 @@ test_double (void) int main(int argc, char **argv) { setlocale (LC_ALL, NULL); - setlocale (LC_NUMERIC, "fr_FR.UTF-8"); + + /* Skip if locale is unavailable */ + if (setlocale (LC_NUMERIC, "fr_FR.UTF-8") == NULL) + return 77; + g_test_init (&argc, &argv, NULL); g_test_add_func ("/gudev/double", test_double); -- cgit v1.2.1