aboutsummaryrefslogtreecommitdiff
path: root/posix/bug-regex1.c
diff options
context:
space:
mode:
Diffstat (limited to 'posix/bug-regex1.c')
-rw-r--r--posix/bug-regex1.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/posix/bug-regex1.c b/posix/bug-regex1.c
index 38eb543951..85da8cc7ca 100644
--- a/posix/bug-regex1.c
+++ b/posix/bug-regex1.c
@@ -41,6 +41,26 @@ main (void)
puts (" -> OK");
}
+ puts ("in C.UTF-8 locale");
+ setlocale (LC_ALL, "C.UTF-8");
+ s = re_compile_pattern ("[anù]*n", 7, &regex);
+ if (s != NULL)
+ {
+ puts ("re_compile_pattern return non-NULL value");
+ result = 1;
+ }
+ else
+ {
+ match = re_match (&regex, "an", 2, 0, &regs);
+ if (match != 2)
+ {
+ printf ("re_match returned %d, expected 2\n", match);
+ result = 1;
+ }
+ else
+ puts (" -> OK");
+ }
+
puts ("in de_DE.ISO-8859-1 locale");
setlocale (LC_ALL, "de_DE.ISO-8859-1");
s = re_compile_pattern ("[anù]*n", 7, &regex);