about summary refs log tree commit diff
path: root/string/tst-strxfrm.c
diff options
context:
space:
mode:
Diffstat (limited to 'string/tst-strxfrm.c')
-rw-r--r--string/tst-strxfrm.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/string/tst-strxfrm.c b/string/tst-strxfrm.c
index 94fd67e062..aef5e4e4ee 100644
--- a/string/tst-strxfrm.c
+++ b/string/tst-strxfrm.c
@@ -15,6 +15,7 @@ test (const char *locale)
   size_t r;
   size_t l;
   char *buf;
+  __locale_t loc;
   int result = 0;
 
   if (setlocale (LC_COLLATE, locale) == NULL)
@@ -37,6 +38,20 @@ test (const char *locale)
 	       locale, r, l);
        result = 1;
     }
+
+  loc = __newlocale (1 << LC_ALL, locale, NULL);
+
+  r = __strxfrm_l (buf, string, bufsize, loc);
+  l = strlen (buf);
+  if (r != l)
+    {
+       printf ("locale \"%s\": strxfrm_l returned %zu, strlen returned %zu\n",
+	       locale, r, l);
+       result = 1;
+    }
+
+  __freelocale (loc);
+
   free (buf);
 
   return result;