summaryrefslogtreecommitdiff
path: root/boilerplate
diff options
context:
space:
mode:
authorM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2009-09-05 05:07:25 +0300
committerM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2009-09-05 05:50:57 +0300
commit7f91c4953ccfbb96d76ecd73715fa2e524be933e (patch)
tree9846ec497ce908b61027d6d142164b0965b282df /boilerplate
parentb3bafbc5f9201662702cc0c0d1c96411e31bb7d3 (diff)
[boilerplate] Support wildcard ? in CAIRO_TEST_TARGET{,_EXCLUDE}.
Useful for running tests only for a given content type.
Diffstat (limited to 'boilerplate')
-rw-r--r--boilerplate/cairo-boilerplate.c10
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? */