diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-05-01 16:36:27 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-05-01 16:36:27 +0000 |
commit | 72c39e3522c5781d1e7dc8abad77d96141c5d49b (patch) | |
tree | e16497caaa0bf20771ef34787de02fc95e5993bf /test/libcss.c | |
download | libcss-72c39e3522c5781d1e7dc8abad77d96141c5d49b.tar.gz libcss-72c39e3522c5781d1e7dc8abad77d96141c5d49b.tar.bz2 |
Import beginnings of a CSS parsing library.
Currently comprises a lexer.
svn path=/trunk/libcss/; revision=4112
Diffstat (limited to 'test/libcss.c')
-rw-r--r-- | test/libcss.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/libcss.c b/test/libcss.c new file mode 100644 index 0000000..5f2e82e --- /dev/null +++ b/test/libcss.c @@ -0,0 +1,29 @@ +#include <stdio.h> +#include <stdlib.h> + +#include <libcss/libcss.h> + +#include "testutils.h" + +static void *myrealloc(void *ptr, size_t len, void *pw) +{ + UNUSED(pw); + + return realloc(ptr, len); +} + +int main(int argc, char **argv) +{ + if (argc != 2) { + printf("Usage: %s <filename>\n", argv[0]); + return 1; + } + + assert(css_initialise(argv[1], myrealloc, NULL) == CSS_OK); + + assert (css_finalise(myrealloc, NULL) == CSS_OK); + + printf("PASS\n"); + + return 0; +} |