1 /* Test case by Jim Meyering <jim@meyering.net>. */
11 struct re_pattern_buffer regex
;
12 struct re_registers regs
;
17 memset (®ex
, '\0', sizeof (regex
));
19 setlocale (LC_ALL
, "de_DE.ISO-8859-1");
22 re_set_syntax (RE_SYNTAX_POSIX_EGREP
| RE_DEBUG
);
25 setlocale (LC_ALL
, "C");
26 s
= re_compile_pattern ("[anù]*n", 7, ®ex
);
29 puts ("re_compile_pattern return non-NULL value");
34 match
= re_match (®ex
, "an", 2, 0, ®s
);
37 printf ("re_match returned %d, expected 2\n", match
);
44 puts ("in de_DE.ISO-8859-1 locale");
45 setlocale (LC_ALL
, "de_DE.ISO-8859-1");
46 s
= re_compile_pattern ("[anù]*n", 7, ®ex
);
49 puts ("re_compile_pattern return non-NULL value");
54 match
= re_match (®ex
, "an", 2, 0, ®s
);
57 printf ("re_match returned %d, expected 2\n", match
);