From a938c19b86709a0c3ea97d2d0090a01861e38236 Mon Sep 17 00:00:00 2001 From: dodji Date: Tue, 17 Jun 2003 21:50:03 +0000 Subject: added test_cr_statement_at_page_rule_parse () to test the new 2003-06-17 dodji * 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. --- tests/test4-main.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'tests') 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) -- cgit v1.2.1