Lines Matching refs:test

64 	printf("Start test '%s' matches to '%s'\n", pattern, string);
107 void run_tests(struct test_case* test, int verbose, int silent)
119 for ( ; test->string ; test++) {
121 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
124 if (test->pattern) {
128 ptr = test->pattern;
132 machine = regex_compile(test->pattern, ptr - test->pattern, test->flags, &error);
136 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
142 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
147 else if (test->flags != 0) {
149 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
154 ptr = test->string;
162 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
167 regex_continue_match_debug(match, test->string, ptr - test->string);
171 if (begin != test->begin || end != test->end || id != test->id) {
173 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
174 printf("FAIL A: begin: %d != %d || end: %d != %d || id: %d != %d\n", test->begin, begin, test->end, end, test->id, id);
177 if (test->finished != -1 && test->finished != !!finished) {
179 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
186 regex_continue_match(match, test->string, ptr - test->string);
191 if (begin != test->begin || end != test->end || id != test->id) {
193 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
194 printf("FAIL B: begin: %d != %d || end: %d != %d || id: %d != %d\n", test->begin, begin, test->end, end, test->id, id);
197 if (test->finished != -1 && test->finished != !!finished) {
199 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);