From 903c8313bc1f8a1ce3d97fc944293d79ccdac76c Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 6 May 2015 02:21:07 -0300 Subject: content-parsed: started inline parser --- tests/check_content_parser.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/check_content_parser.c b/tests/check_content_parser.c index b3e7092..a613052 100644 --- a/tests/check_content_parser.c +++ b/tests/check_content_parser.c @@ -56,7 +56,9 @@ test_content_parse(void **state) "\n" "\n" "guda\n" - "yay"; + "yay\n" + "\n" + "**bola**\n"; blogc_error_t *err = NULL; char *html = blogc_content_parse(a, strlen(a), &err); assert_null(err); @@ -91,7 +93,8 @@ test_content_parse(void **state) " chunda\n" "\n" "

guda\n" - "yay

\n"); + "yay

\n" + "

**bola**

\n"); free(html); } @@ -319,6 +322,18 @@ test_content_parse_invalid_code(void **state) } +void +test_content_parse_inline(void **state) +{ + char *html = blogc_content_parse_inline("**bola***asd* ``chunda``"); + assert_string_equal(html, "bolaasd chunda"); + free(html); + html = blogc_content_parse_inline("*bola*"); + assert_string_equal(html, "bola"); + free(html); +} + + int main(void) { @@ -332,6 +347,7 @@ main(void) unit_test(test_content_parse_invalid_header_empty), unit_test(test_content_parse_invalid_blockquote), unit_test(test_content_parse_invalid_code), + unit_test(test_content_parse_inline), }; return run_tests(tests); } -- cgit v1.2.3-18-g5258