aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-05-07 01:37:26 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-05-07 01:37:26 -0300
commit28b02d920aa9347f25bc28f5989919174d9f60a9 (patch)
treee59f0e375a89c32ecf05cd32238216541a3e1c86 /tests
parent6465244e540966e6639939b41e0290481b54567d (diff)
downloadblogc-28b02d920aa9347f25bc28f5989919174d9f60a9.tar.gz
blogc-28b02d920aa9347f25bc28f5989919174d9f60a9.tar.bz2
blogc-28b02d920aa9347f25bc28f5989919174d9f60a9.zip
content-parser: lots of random stuff
Diffstat (limited to 'tests')
-rw-r--r--tests/check_content_parser.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/check_content_parser.c b/tests/check_content_parser.c
index ab1bf49..6fec86c 100644
--- a/tests/check_content_parser.c
+++ b/tests/check_content_parser.c
@@ -325,8 +325,14 @@ 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, "<strong>bola</strong><em>asd</em> <code>chunda</code>");
+ char *html = blogc_content_parse_inline(
+ "**bola***asd* [![lol](http://google.com/lol.png) **lol** "
+ "\\[asd\\]\\(qwe\\)](http://google.com) ``chunda``");
+ assert_string_equal(html,
+ "<strong>bola</strong><em>asd</em> "
+ "<a href=\"http://google.com\"><img src=\"http://google.com/lol.png\" "
+ "alt=\"lol\"> <strong>lol</strong> [asd](qwe)</a> "
+ "<code>chunda</code>");
free(html);
html = blogc_content_parse_inline("*bola*");
assert_string_equal(html, "<em>bola</em>");