summaryrefslogtreecommitdiff
path: root/tests/test4-main.c
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@src.gnome.org>2003-06-09 13:45:43 +0000
committerDodji Seketeli <dodji@src.gnome.org>2003-06-09 13:45:43 +0000
commitdbe4c464a5e2079fa21f05ad74fe36c93cb64670 (patch)
tree8ef3169fe49392b1f570893e2c5c7812d8b61f92 /tests/test4-main.c
parentaba3d6844be54f028b33c3f4aa66274a35fb1bdc (diff)
downloadlibcroco-dbe4c464a5e2079fa21f05ad74fe36c93cb64670.tar.gz
fixed a bug that prevented this parsing function to be called outside the
* src/parser/cr-parser.c (cr_parser_parse_declaration): fixed a bug that prevented this parsing function to be called outside the stylesheet parsing context. Dodji.
Diffstat (limited to 'tests/test4-main.c')
-rw-r--r--tests/test4-main.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/test4-main.c b/tests/test4-main.c
index 9f68c43..6ece7d2 100644
--- a/tests/test4-main.c
+++ b/tests/test4-main.c
@@ -35,6 +35,9 @@
CRDocHandler * gv_test_handler = {0} ;
+const guchar * gv_decl=
+"toto: tutu, tata" ;
+
static void
display_help (char *prg_name) ;
@@ -114,6 +117,21 @@ test_cr_parser_parse (guchar * a_file_uri)
return status ;
}
+static enum CRStatus
+test_cr_declaration_parse (void)
+{
+ CRDeclaration * decl = NULL ;
+
+ decl = cr_declaration_parse (NULL, gv_decl,
+ CR_UTF_8) ;
+
+ if (decl)
+ {
+ cr_declaration_destroy (decl) ;
+ return CR_OK ;
+ }
+ return CR_ERROR ;
+}
/**
*The entry point of the testing routine.
@@ -123,6 +141,14 @@ main (int argc, char ** argv)
{
struct Options options ;
enum CRStatus status = CR_OK ;
+
+ status = test_cr_declaration_parse () ;
+
+ if (status != CR_OK)
+ {
+ g_print ("\nKO\n") ;
+ return 0 ;
+ }
cr_test_utils_parse_cmd_line (argc, argv, &options) ;
@@ -143,7 +169,7 @@ main (int argc, char ** argv)
display_help (argv[0]) ;
return 0 ;
}
-
+
status = test_cr_parser_parse (options.files_list[0]) ;