From 7ecab92e9a8508c44a758a8ca58defe9a5965bb4 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 14 Feb 2009 00:06:01 +0000 Subject: A motley selection of changes. Vague summary: + Add config makefile (not that there's anything to configure at present :) + Fix dumping of UNIT_MS to actually use sprintf and not printf + Extend computed style dumping (still loads of properties missing) + Make result buffer larger in select-auto.c -- avoids buffer overflows when there's way more output than expected + Expand expected test output to contain defaulted properties (more of this will be needed once the computed style dumping is complete) + Store interned string pointers in css_select_state. + Intern pseudo class/element names at start of selecting styles for a sheet + Group properties so we know which ones appear in the extension blocks + Fixup unset properties once the cascade has completed + Implement matching of pseudo class/element selectors + Fix setting of background-image and list-style-image when there's no URL. svn path=/trunk/libcss/; revision=6470 --- test/select-auto.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/select-auto.c') diff --git a/test/select-auto.c b/test/select-auto.c index 75558c4..19af180 100644 --- a/test/select-auto.c +++ b/test/select-auto.c @@ -624,11 +624,11 @@ void run_test(line_ctx *ctx, const char *exp, size_t explen) UNUSED(exp); - buf = malloc(2 * explen); + buf = malloc(8192); if (buf == NULL) { assert(0 && "No memory for result data"); } - buflen = 2 * explen; + buflen = 8192; assert(css_select_ctx_create(myrealloc, NULL, &select) == CSS_OK); @@ -647,10 +647,10 @@ void run_test(line_ctx *ctx, const char *exp, size_t explen) dump_computed_style(computed, buf, &buflen); - if (2 * explen - buflen != explen || memcmp(buf, exp, explen) != 0) { + if (8192 - buflen != explen || memcmp(buf, exp, explen) != 0) { printf("Expected (%zu):\n%.*s\n", explen, (int) explen, exp); - printf("Result (%zu):\n%.*s\n", 2 * explen - buflen, - (int) (2 * explen - buflen), buf); + printf("Result (%zu):\n%.*s\n", 8192 - buflen, + (int) (8192 - buflen), buf); assert(0 && "Result doesn't match expected"); } -- cgit v1.2.3