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_source_parser.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests/check_source_parser.c') diff --git a/tests/check_source_parser.c b/tests/check_source_parser.c index 2f5880a..c58479e 100644 --- a/tests/check_source_parser.c +++ b/tests/check_source_parser.c @@ -16,6 +16,7 @@ #include #include #include "../src/source-parser.h" +#include "../src/error.h" static void @@ -28,7 +29,9 @@ test_source_parse(void **state) "# This is a test\n" "\n" "bola\n"; - blogc_source_t *source = blogc_source_parse(a, strlen(a)); + blogc_error_t *err = NULL; + blogc_source_t *source = blogc_source_parse(a, strlen(a), &err); + assert_null(err); assert_non_null(source); assert_int_equal(b_trie_size(source->config), 2); assert_string_equal(b_trie_lookup(source->config, "VAR1"), "asd asd"); @@ -53,7 +56,9 @@ test_source_parse_with_spaces(void **state) "# This is a test\n" "\n" "bola\n"; - blogc_source_t *source = blogc_source_parse(a, strlen(a)); + blogc_error_t *err = NULL; + blogc_source_t *source = blogc_source_parse(a, strlen(a), &err); + assert_null(err); assert_non_null(source); assert_int_equal(b_trie_size(source->config), 2); assert_string_equal(b_trie_lookup(source->config, "VAR1"), "chunda"); -- cgit v1.2.3-18-g5258