aboutsummaryrefslogtreecommitdiffstats
path: root/tests/check_content_parser.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-02-21 14:30:40 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-02-21 14:30:40 +0100
commit9902e223799f40776d1131aa0d48fc766637746e (patch)
treef1893f2e6c4841bb0681cac0e6a91072df85dc71 /tests/check_content_parser.c
parent31d376735ab2aaaed0934edcce676113f83a7de7 (diff)
downloadblogc-9902e223799f40776d1131aa0d48fc766637746e.tar.gz
blogc-9902e223799f40776d1131aa0d48fc766637746e.tar.bz2
blogc-9902e223799f40776d1131aa0d48fc766637746e.zip
content-parser: added more tests
Diffstat (limited to 'tests/check_content_parser.c')
-rw-r--r--tests/check_content_parser.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/check_content_parser.c b/tests/check_content_parser.c
index 73bbe9b..048d2f2 100644
--- a/tests/check_content_parser.c
+++ b/tests/check_content_parser.c
@@ -1598,6 +1598,18 @@ test_content_parse_inline_image(void **state)
assert_non_null(html);
assert_string_equal(html, "<img src=\"http://example.org/\" alt=\"bola\">\n");
free(html);
+ html = blogc_content_parse_inline("![bola]\r\n(http://example.org/)\n");
+ assert_non_null(html);
+ assert_string_equal(html, "<img src=\"http://example.org/\" alt=\"bola\">\n");
+ free(html);
+ html = blogc_content_parse_inline("![bola] \r\n (http://example.org/)\n");
+ assert_non_null(html);
+ assert_string_equal(html, "<img src=\"http://example.org/\" alt=\"bola\">\n");
+ free(html);
+ html = blogc_content_parse_inline("asd ![bola]chunda(1234)");
+ assert_non_null(html);
+ assert_string_equal(html, "asd ![bola]chunda(1234)");
+ free(html);
// "invalid"
html = blogc_content_parse_inline("![bo\nla](http://example.org/)\n");
assert_non_null(html);