mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-27 04:40:11 +01:00
[boilerplate] Support wildcard ? in CAIRO_TEST_TARGET{,_EXCLUDE}.
Useful for running tests only for a given content type.
This commit is contained in:
parent
b3bafbc5f9
commit
7f91c4953c
1 changed files with 6 additions and 4 deletions
|
|
@ -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? */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue