diff options
Diffstat (limited to 'posix/bug-regex1.c')
-rw-r--r-- | posix/bug-regex1.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/posix/bug-regex1.c b/posix/bug-regex1.c index b8cf97c8ce..99357e359e 100644 --- a/posix/bug-regex1.c +++ b/posix/bug-regex1.c @@ -40,6 +40,26 @@ main (void) puts (" -> OK"); } + puts ("in C.UTF-8 locale"); + setlocale (LC_ALL, "C.UTF-8"); + s = re_compile_pattern ("[an\371]*n", 7, ®ex); + if (s != NULL) + { + puts ("re_compile_pattern return non-NULL value"); + result = 1; + } + else + { + match = re_match (®ex, "an", 2, 0, ®s); + 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\371]*n", 7, ®ex); |