From de39a41da62c4b3820b4805ddb7c4970c36bc257 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sat, 18 Apr 2015 17:17:37 -0300 Subject: added loader, error handling and cli. tests needed --- tests/check_template_parser.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests/check_template_parser.c') diff --git a/tests/check_template_parser.c b/tests/check_template_parser.c index 7839bbf..a0cd95c 100644 --- a/tests/check_template_parser.c +++ b/tests/check_template_parser.c @@ -16,6 +16,7 @@ #include #include #include "../src/template-parser.h" +#include "../src/error.h" static void @@ -44,7 +45,9 @@ test_template_parse(void **state) "{% endblock %}\n" "{% block multiple_sources %}{{ BOLA }}{% endblock %}\n" "{% block multiple_sources_once %}asd{% endblock %}\n"; - b_slist_t *stmts = blogc_template_parse(a, strlen(a)); + blogc_error_t *err = NULL; + b_slist_t *stmts = blogc_template_parse(a, strlen(a), &err); + assert_null(err); assert_non_null(stmts); blogc_assert_template_stmt(stmts, "Test\n\n ", BLOGC_TEMPLATE_CONTENT_STMT); @@ -110,7 +113,9 @@ test_template_parse_html(void **state) " {% block multiple_sources_once %}{% endblock %}\n" " \n" "\n"; - b_slist_t *stmts = blogc_template_parse(a, strlen(a)); + blogc_error_t *err = NULL; + b_slist_t *stmts = blogc_template_parse(a, strlen(a), &err); + assert_null(err); assert_non_null(stmts); blogc_assert_template_stmt(stmts, "\n \n ", BLOGC_TEMPLATE_CONTENT_STMT); -- cgit v1.2.3-18-g5258