Home | History | Annotate | Download | only in testsuite

Lines Matching refs:tests

1 /* Regular expression tests.
33 /* Tests supposed to match. */
40 } tests[] = {
43 /* Other tests. */
62 /* More tests on backreferences. */
107 for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i)
109 n = regcomp (&re, tests[i].pattern, tests[i].flags);
114 printf ("%s: regcomp %lu failed: %s\n", tests[i].pattern, i, buf);
119 if (regexec (&re, tests[i].string, tests[i].nmatch, rm, 0))
121 printf ("%s: regexec %lu failed\n", tests[i].pattern, i);
127 for (n = 0; n < tests[i].nmatch; ++n)
128 if (rm[n].rm_so != tests[i].rm[n].rm_so
129 || rm[n].rm_eo != tests[i].rm[n].rm_eo)
131 if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1)
134 tests[i].pattern, i, n, rm[n].rm_so, rm[n].rm_eo);