From 03067ce786912393f7881d270721a01aa43597a7 Mon Sep 17 00:00:00 2001 From: vlefevre Date: Mon, 23 Aug 2021 01:45:57 +0000 Subject: [tests/tsprintf.c] In locale_da_DK(), also try da_DK.utf8 (preferably): in Debian/unstable, da_DK no longer exists. git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14566 280ebfd0-de03-0410-8827-d642c229c3f4 --- tests/tsprintf.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/tsprintf.c b/tests/tsprintf.c index e4ea6a81b..de4ebf754 100644 --- a/tests/tsprintf.c +++ b/tests/tsprintf.c @@ -927,16 +927,19 @@ mixed (void) #if defined(HAVE_LOCALE_H) && defined(HAVE_SETLOCALE) && MPFR_LCONV_DPTS -/* Check with locale "da_DK". On most platforms, decimal point is ',' - and thousands separator is '.'; the test is not performed if this - is not the case or if the locale doesn't exist. */ +/* Check with locale "da_DK.utf8" or "da_DK". + On most platforms, decimal point is ',' and thousands separator is '.'; + if this is not the case or if the locale does not exist, the test is not + performed (and if the MPFR_CHECK_LOCALES environment variable is set, + the program fails). */ static void locale_da_DK (void) { mpfr_prec_t p = 128; mpfr_t x, y; - if (setlocale (LC_ALL, "da_DK") == 0 || + if ((setlocale (LC_ALL, "da_DK.utf8") == 0 && + setlocale (LC_ALL, "da_DK") == 0) || localeconv()->decimal_point[0] != ',' || localeconv()->thousands_sep[0] != '.') { -- cgit v1.2.1