[boilerplate] Support wildcard ? in CAIRO_TEST_TARGET{,_EXCLUDE}.

Useful for running tests only for a given content type.
This commit is contained in:
M Joonas Pihlaja 2009-09-05 05:07:25 +03:00
parent b3bafbc5f9
commit 7f91c4953c

View file

@ -392,10 +392,12 @@ _cairo_boilerplate_target_matches_name (const cairo_boilerplate_target_t *target
name_len = end - tname;
/* Check name. */
if (0 != strncmp (target->name, tname, name_len)) /* exact match? */
return FALSE;
if (isalnum (target->name[name_len]))
return FALSE;
if (! (name_len == 1 && 0 == strncmp (tname, "?", 1))) { /* wildcard? */
if (0 != strncmp (target->name, tname, name_len)) /* exact match? */
return FALSE;
if (isalnum (target->name[name_len]))
return FALSE;
}
/* Check optional content. */
if (content_start == NULL) /* none given? */