about summary refs log tree commit diff
path: root/posix/tst-regexloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'posix/tst-regexloc.c')
-rw-r--r--posix/tst-regexloc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/posix/tst-regexloc.c b/posix/tst-regexloc.c
index 7fbc496d0c..3ed3b68a1a 100644
--- a/posix/tst-regexloc.c
+++ b/posix/tst-regexloc.c
@@ -29,8 +29,12 @@ do_test (void)
 
   if (setlocale (LC_ALL, "de_DE.ISO-8859-1") == NULL)
     puts ("cannot set locale");
-  else if (regcomp (&re, "[abcdef]*", 0) != REG_NOERROR)
-    puts ("cannot compile expression \"[abcdef]*\"");
+  /* Range expressions in non-POSIX locales are unspecified, but
+     for now in glibc we maintain lowercase/uppercase distinction
+     in our collation element order (but not in collation weights
+     which means strcoll_l still collates as expected).  */
+  else if (regcomp (&re, "[a-f]*", 0) != REG_NOERROR)
+    puts ("cannot compile expression \"[a-f]*\"");
   else if (regexec (&re, "abcdefCDEF", 1, mat, 0) == REG_NOMATCH)
     puts ("no match");
   else