diff options
author | Dodji Seketeli <dodji@src.gnome.org> | 2003-06-09 18:09:44 +0000 |
---|---|---|
committer | Dodji Seketeli <dodji@src.gnome.org> | 2003-06-09 18:09:44 +0000 |
commit | 400f3b108f7e00c1a3189fed728581df8ed8dce7 (patch) | |
tree | 1391087cfa2a00a0eed54c51d97d86a6281ea963 /tests | |
parent | dbe4c464a5e2079fa21f05ad74fe36c93cb64670 (diff) | |
download | libcroco-400f3b108f7e00c1a3189fed728581df8ed8dce7.tar.gz |
updated this test to test the new cr_declaration_to_string () api.
* tests/test4-main.c: updated this test to test the
new cr_declaration_to_string () api.
* src/parser/cr-declaration.[ch] (cr_declaration_to_string ()):
Added this new api to allow the serialisation of css declarations.
This is not well tested yet, but it works.
Dodji.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test4-main.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/test4-main.c b/tests/test4-main.c index 6ece7d2..83ff06f 100644 --- a/tests/test4-main.c +++ b/tests/test4-main.c @@ -120,16 +120,25 @@ test_cr_parser_parse (guchar * a_file_uri) static enum CRStatus test_cr_declaration_parse (void) { + guchar * tmp_str = NULL ; CRDeclaration * decl = NULL ; decl = cr_declaration_parse (NULL, gv_decl, CR_UTF_8) ; + tmp_str = cr_declaration_to_string (decl, 2) ; if (decl) { cr_declaration_destroy (decl) ; return CR_OK ; } + + if (tmp_str) + { + g_free (tmp_str) ; + tmp_str = NULL ; + } + return CR_ERROR ; } @@ -141,7 +150,7 @@ main (int argc, char ** argv) { struct Options options ; enum CRStatus status = CR_OK ; - + status = test_cr_declaration_parse () ; if (status != CR_OK) @@ -149,7 +158,7 @@ main (int argc, char ** argv) g_print ("\nKO\n") ; return 0 ; } - + cr_test_utils_parse_cmd_line (argc, argv, &options) ; if (options.display_help == TRUE) |