summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@seketeli.org>2003-06-18 19:28:42 +0000
committerDodji Seketeli <dodji@src.gnome.org>2003-06-18 19:28:42 +0000
commit127628a4ae11a60cbf609ae1396345190f9d1129 (patch)
treefb108984e6df5814bac75621a7edec0a6bf65577 /tests
parent28260b0a57917142eaeedd918d7185a80d66ea6b (diff)
downloadlibcroco-127628a4ae11a60cbf609ae1396345190f9d1129.tar.gz
added cr_statement_font_face_rule_parse_from_buf () . and a generic
2003-06-18 Dodji Seketeli <dodji@seketeli.org> * src/parser/cr-statement.[ch]: added cr_statement_font_face_rule_parse_from_buf () . and a generic cr_statement_parse_from_buf () that knows how to a parse virtually any css2 statement. This needs debugging though. * src/parser/cr-parser.c: fixed some possible sigsev that could occur when trying to access a null sac handler. Dodji.
Diffstat (limited to 'tests')
-rw-r--r--tests/test4-main.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/tests/test4-main.c b/tests/test4-main.c
index 1006c23..414455a 100644
--- a/tests/test4-main.c
+++ b/tests/test4-main.c
@@ -56,6 +56,13 @@ const guchar *gv_at_charset_buf =
"@charset \"ISO-8859-1\" ; "
;
+const guchar *gv_at_font_face_buf=
+"@font-face {"
+" font-family: \"Robson Celtic\";"
+" src: url(\"http://site/fonts/rob-celt\")"
+"}"
+;
+
static void
display_help (char *prg_name) ;
@@ -232,6 +239,24 @@ test_cr_statement_at_charset_rule_parse (void)
return CR_OK ;
}
+
+static enum CRStatus
+test_cr_statement_font_face_rule_parse_from_buf (void)
+{
+ CRStatement *stmt = NULL ;
+
+ stmt = cr_statement_font_face_rule_parse_from_buf (gv_at_font_face_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.
*/
@@ -269,7 +294,14 @@ main (int argc, char ** argv)
return 0 ;
}
- test_cr_statement_at_charset_rule_parse () ;
+ status = test_cr_statement_at_charset_rule_parse () ;
+ if (status != CR_OK)
+ {
+ g_print ("\nKO\n") ;
+ return 0 ;
+ }
+
+ status = test_cr_statement_font_face_rule_parse_from_buf () ;
if (status != CR_OK)
{
g_print ("\nKO\n") ;