summaryrefslogtreecommitdiff
path: root/tests/test-localename.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-02 12:05:34 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-02 12:05:34 +0100
commit7c78c92a28ef43d68b172adf97fbd8a27be3baec (patch)
tree3a98b0d01865f5e00912521c58386eb008a70d07 /tests/test-localename.c
parent4d76768442551c97a85e6f133cb818d223012746 (diff)
parent3ee36dc9787cee6ab5314af8f9c01b05a50e7d9d (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'tests/test-localename.c')
-rw-r--r--tests/test-localename.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/test-localename.c b/tests/test-localename.c
index be8fcaf..ff7853f 100644
--- a/tests/test-localename.c
+++ b/tests/test-localename.c
@@ -1,5 +1,5 @@
/* Test of gl_locale_name function and its variants.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -12,7 +12,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
@@ -27,7 +27,7 @@
#include "macros.h"
-#if HAVE_NEWLOCALE
+#if HAVE_NEWLOCALE && HAVE_USELOCALE
static struct { int cat; int mask; const char *string; } const categories[] =
{
@@ -70,7 +70,7 @@ test_locale_name (void)
/* Get into a defined state, */
setlocale (LC_ALL, "en_US.UTF-8");
-#if HAVE_NEWLOCALE
+#if HAVE_NEWLOCALE && HAVE_USELOCALE
uselocale (LC_GLOBAL_LOCALE);
#endif
@@ -172,7 +172,7 @@ test_locale_name (void)
ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
}
-#if HAVE_NEWLOCALE
+#if HAVE_NEWLOCALE && HAVE_USELOCALE
/* Check that gl_locale_name considers the thread locale. */
{
locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
@@ -232,7 +232,7 @@ test_locale_name_thread (void)
/* Get into a defined state, */
setlocale (LC_ALL, "en_US.UTF-8");
-#if HAVE_NEWLOCALE
+#if HAVE_NEWLOCALE && HAVE_USELOCALE
/* Check that gl_locale_name_thread returns NULL when no thread locale is
set. */
uselocale (LC_GLOBAL_LOCALE);
@@ -487,7 +487,7 @@ test_locale_name_posix (void)
/* Get into a defined state, */
setlocale (LC_ALL, "en_US.UTF-8");
-#if HAVE_NEWLOCALE
+#if HAVE_NEWLOCALE && HAVE_USELOCALE
uselocale (LC_GLOBAL_LOCALE);
#endif
@@ -592,7 +592,7 @@ test_locale_name_posix (void)
ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
}
-#if HAVE_NEWLOCALE
+#if HAVE_NEWLOCALE && HAVE_USELOCALE
/* Check that gl_locale_name_posix ignores the thread locale. */
{
locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
@@ -621,7 +621,7 @@ test_locale_name_environ (void)
/* Get into a defined state, */
setlocale (LC_ALL, "en_US.UTF-8");
-#if HAVE_NEWLOCALE
+#if HAVE_NEWLOCALE && HAVE_USELOCALE
uselocale (LC_GLOBAL_LOCALE);
#endif
@@ -706,7 +706,7 @@ test_locale_name_environ (void)
name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES");
ASSERT (strcmp (name, "fr_FR.UTF-8") == 0);
-#if HAVE_NEWLOCALE
+#if HAVE_NEWLOCALE && HAVE_USELOCALE
/* Check that gl_locale_name_environ ignores the thread locale. */
{
locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);
@@ -741,7 +741,7 @@ test_locale_name_default (void)
ASSERT (strcmp (name, "C") == 0);
#endif
-#if HAVE_NEWLOCALE
+#if HAVE_NEWLOCALE && HAVE_USELOCALE
/* Check that gl_locale_name_default ignores the thread locale. */
{
locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL);