1 /* Test re_compile_pattern error messages. */
10 struct re_pattern_buffer re;
14 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
15 memset (&re, 0, sizeof (re));
16 s = re_compile_pattern ("[[.invalid_collating_symbol.]]", 30, &re);
17 if (s == NULL || strcmp (s, "Invalid collation character"))
19 printf ("re_compile_pattern returned %s\n", s);
22 s = re_compile_pattern ("[[=invalid_equivalence_class=]]", 31, &re);
23 if (s == NULL || strcmp (s, "Invalid collation character"))
25 printf ("re_compile_pattern returned %s\n", s);
28 s = re_compile_pattern ("[[:invalid_character_class:]]", 29, &re);
29 if (s == NULL || strcmp (s, "Invalid character class name"))
31 printf ("re_compile_pattern returned %s\n", s);