1 /* Test case by Jim Meyering <jim@meyering.net>. */
7 #include <gnu/option-groups.h>
12 struct re_pattern_buffer regex;
13 struct re_registers regs;
18 memset (®ex, '\0', sizeof (regex));
20 setlocale (LC_ALL, "de_DE.ISO-8859-1");
21 #if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
25 re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_DEBUG);
28 setlocale (LC_ALL, "C");
29 s = re_compile_pattern ("[anù]*n", 7, ®ex);
32 puts ("re_compile_pattern return non-NULL value");
37 match = re_match (®ex, "an", 2, 0, ®s);
40 printf ("re_match returned %d, expected 2\n", match);
47 puts ("in de_DE.ISO-8859-1 locale");
48 setlocale (LC_ALL, "de_DE.ISO-8859-1");
49 s = re_compile_pattern ("[anù]*n", 7, ®ex);
52 puts ("re_compile_pattern return non-NULL value");
57 match = re_match (®ex, "an", 2, 0, ®s);
60 printf ("re_match returned %d, expected 2\n", match);