diff options
author | M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> | 2009-09-05 05:07:25 +0300 |
---|---|---|
committer | M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> | 2009-09-05 05:50:57 +0300 |
commit | 7f91c4953ccfbb96d76ecd73715fa2e524be933e (patch) | |
tree | 9846ec497ce908b61027d6d142164b0965b282df | |
parent | b3bafbc5f9201662702cc0c0d1c96411e31bb7d3 (diff) |
[boilerplate] Support wildcard ? in CAIRO_TEST_TARGET{,_EXCLUDE}.
Useful for running tests only for a given content type.
-rw-r--r-- | boilerplate/cairo-boilerplate.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c index e681108b..46bb0574 100644 --- a/boilerplate/cairo-boilerplate.c +++ b/boilerplate/cairo-boilerplate.c @@ -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? */ |