| 1 | #include <regex.h> |
| 2 | #include <stdio.h> |
| 3 | |
| 4 | static int |
| 5 | do_test (void) |
| 6 | { |
| 7 | regex_t r; |
| 8 | int e = regcomp(preg: &r, pattern: "xy\\{4,5,7\\}zabc" , cflags: 0); |
| 9 | char buf[100]; |
| 10 | regerror(errcode: e, preg: &r, errbuf: buf, errbuf_size: sizeof (buf)); |
| 11 | printf (format: "e = %d (%s)\n" , e, buf); |
| 12 | int res = e != REG_BADBR; |
| 13 | |
| 14 | e = regcomp(preg: &r, pattern: "xy\\{4,5a\\}zabc" , cflags: 0); |
| 15 | regerror(errcode: e, preg: &r, errbuf: buf, errbuf_size: sizeof (buf)); |
| 16 | printf (format: "e = %d (%s)\n" , e, buf); |
| 17 | res |= e != REG_BADBR; |
| 18 | |
| 19 | return res; |
| 20 | } |
| 21 | |
| 22 | #define TEST_FUNCTION do_test () |
| 23 | #include "../test-skeleton.c" |
| 24 | |