From dcc0deb8e5cc5bf817d60a11b19e226a1bc22bd1 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 22 Mar 2009 16:39:32 +0000 Subject: Fix test harness to actually stand a chance of working. svn path=/trunk/libcss/; revision=6818 --- test/select-auto.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/select-auto.c b/test/select-auto.c index daef112..a0e63da 100644 --- a/test/select-auto.c +++ b/test/select-auto.c @@ -70,7 +70,8 @@ static void parse_expected(line_ctx *ctx, const char *data, size_t len); static void run_test(line_ctx *ctx, const char *exp, size_t explen); static void destroy_tree(node *root); -static css_error node_name(void *pw, void *node, lwc_context *ctx, lwc_string **name); +static css_error node_name(void *pw, void *node, lwc_context *ctx, + lwc_string **name); static css_error named_ancestor_node(void *pw, void *node, lwc_string *name, void **ancestor); @@ -156,6 +157,9 @@ int main(int argc, char **argv) assert(lwc_create_context(myrealloc, NULL, &ctx.dict) == lwc_error_ok); lwc_context_ref(ctx.dict); + + lwc_context_intern(ctx.dict, "class", SLEN("class"), &ctx.attr_class); + lwc_context_intern(ctx.dict, "id", SLEN("id"), &ctx.attr_id); assert(parse_testfile(argv[2], handle_line, &ctx) == true); @@ -231,7 +235,6 @@ bool handle_line(const char *data, size_t datalen, void *pw) ctx->expused = 0; - ctx->intree = false; ctx->insheet = false; ctx->inerrors = false; @@ -628,7 +631,8 @@ void run_test(line_ctx *ctx, const char *exp, size_t explen) testnum++; assert(css_select_style(select, ctx->target, ctx->pseudo_element, - ctx->media, computed, &select_handler, ctx) == CSS_OK); + ctx->media, NULL, computed, &select_handler, ctx) == + CSS_OK); dump_computed_style(computed, buf, &buflen); -- cgit v1.2.3