blob: cfc9f99dbcccb5b73b4a1497a1f802d039a46b5f [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#include <regex.h>
2#include <stdio.h>
3
4static int
5do_test (void)
6{
7 regex_t r;
8 int e = regcomp(&r, "xy\\{4,5,7\\}zabc", 0);
9 char buf[100];
10 regerror(e, &r, buf, sizeof (buf));
11 printf ("e = %d (%s)\n", e, buf);
12 int res = e != REG_BADBR;
13
14 e = regcomp(&r, "xy\\{4,5a\\}zabc", 0);
15 regerror(e, &r, buf, sizeof (buf));
16 printf ("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"