summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordodji <dodji@seketeli.org>2003-06-17 21:50:03 +0000
committerDodji Seketeli <dodji@src.gnome.org>2003-06-17 21:50:03 +0000
commita938c19b86709a0c3ea97d2d0090a01861e38236 (patch)
tree591cff2e8e1042650cce45895c20e4d51745d13c /tests
parentd14f86ba72cde186e4e323f2c7819b82fc0cd3a9 (diff)
downloadlibcroco-a938c19b86709a0c3ea97d2d0090a01861e38236.tar.gz
added test_cr_statement_at_page_rule_parse () to test the new
2003-06-17 dodji <dodji@seketeli.org> * tests/test4-main.c: added test_cr_statement_at_page_rule_parse () to test the new cr_statement_at_page_rule_parse_from_buf() function. * src/parser/cr-statement.[ch]: added a first version of cr_statement_at_page_rule_parse_from_buf(). This doesn't work. I need to debug it first. Dodji.
Diffstat (limited to 'tests')
-rw-r--r--tests/test4-main.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/test4-main.c b/tests/test4-main.c
index 4563fa7..1d48a39 100644
--- a/tests/test4-main.c
+++ b/tests/test4-main.c
@@ -48,6 +48,10 @@ const guchar *gv_at_media_buf =
" }"
;
+const guchar *gv_at_page_buf =
+"@page { size 8.5in 11in; margin: 2cm }"
+;
+
static void
display_help (char *prg_name) ;
@@ -188,6 +192,25 @@ test_cr_statement_at_media_rule_parse (void)
return CR_OK ;
}
+static enum CRStatus
+test_cr_statement_at_page_rule_parse (void)
+{
+ CRStatement *stmt = NULL ;
+
+ stmt = cr_statement_at_page_rule_parse_from_buf (gv_at_page_buf,
+ CR_UTF_8) ;
+
+ g_return_val_if_fail (stmt, CR_ERROR) ;
+
+ if (stmt)
+ {
+ cr_statement_destroy (stmt) ;
+ stmt = NULL ;
+ }
+
+ return CR_OK ;
+}
+
/**
*The entry point of the testing routine.
*/
@@ -218,6 +241,13 @@ main (int argc, char ** argv)
return 0 ;
}
+ test_cr_statement_at_page_rule_parse () ;
+ if (status != CR_OK)
+ {
+ g_print ("\nKO\n") ;
+ return 0 ;
+ }
+
cr_test_utils_parse_cmd_line (argc, argv, &options) ;
if (options.display_help == TRUE)