Lines Matching +defs:string +defs:match

52 void verbose_test(regex_char_t *pattern, regex_char_t *string)
57 struct regex_match* match;
64 printf("Start test '%s' matches to '%s'\n", pattern, string);
76 match = regex_begin_match(machine);
77 if (!match) {
83 ptr = string;
87 regex_continue_match_debug(match, string, ptr - string);
89 begin = regex_get_result(match, &end, &id);
92 regex_free_match(match);
104 const regex_char_t *string; /* NULL : end of tests. */
112 struct regex_match* match;
119 for ( ; test->string ; test++) {
121 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
136 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
142 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
149 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
154 ptr = test->string;
158 match = regex_begin_match(machine);
160 if (!match) {
162 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
167 regex_continue_match_debug(match, test->string, ptr - test->string);
168 begin = regex_get_result(match, &end, &id);
169 finished = regex_is_match_finished(match);
173 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
179 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
185 regex_reset_match(match);
186 regex_continue_match(match, test->string, ptr - test->string);
187 begin = regex_get_result(match, &end, &id);
188 finished = regex_is_match_finished(match);
189 regex_free_match(match);
193 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);
199 printf("test: '%s' '%s': ", test->pattern ? test->pattern : "[[REUSE]]", test->string);