From: Bruno Haible Date: Sun, 16 Oct 2016 18:09:16 +0000 (+0200) Subject: Fix a test crash. X-Git-Tag: v1.0~6602 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=9578dfeefac8810915eab9e3d7f76a3aa3f21f46;p=gnulib.git Fix a test crash. * tests/test-duplocale.c (main): Skip the test if the 'newlocale' call fails. --- diff --git a/ChangeLog b/ChangeLog index c272e81aa6..4fcfdaf308 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-10-16 Bruno Haible + + Fix a test crash. + * tests/test-duplocale.c (main): Skip the test if the 'newlocale' call + fails. + 2016-10-16 Pádraig Brady test-limits-h: suppress -Woverlength-strings diff --git a/tests/test-duplocale.c b/tests/test-duplocale.c index 498e31d65e..667b3e2d1d 100644 --- a/tests/test-duplocale.c +++ b/tests/test-duplocale.c @@ -72,6 +72,11 @@ main () /* Use a per-thread locale. */ perthread = newlocale (LC_ALL_MASK, "es_ES.UTF-8", NULL); + if (perthread == NULL) + { + fprintf (stderr, "Skipping test: Spanish Unicode locale is not installed\n"); + return 77; + } uselocale (perthread); /* Save the locale in a locale_t object again. */