From f63fb03b25b33d5c2ef5ef0eaad016b4ee4aee65 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sat, 13 Feb 2016 01:02:12 +0100 Subject: content-parser: fixed bug that parsed text with '!' + link as image --- tests/check_content_parser.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/check_content_parser.c') diff --git a/tests/check_content_parser.c b/tests/check_content_parser.c index 970ec5c..e8e412a 100644 --- a/tests/check_content_parser.c +++ b/tests/check_content_parser.c @@ -1360,6 +1360,10 @@ test_content_parse_inline(void **state) assert_non_null(html); assert_string_equal(html, "bola"); free(html); + html = blogc_content_parse_inline("bola!"); + assert_non_null(html); + assert_string_equal(html, "bola!"); + free(html); } @@ -1475,6 +1479,10 @@ test_content_parse_inline_link(void **state) assert_non_null(html); assert_string_equal(html, "bola\n"); free(html); + html = blogc_content_parse_inline("[bola!](http://example.org/)\n"); + assert_non_null(html); + assert_string_equal(html, "bola!\n"); + free(html); html = blogc_content_parse_inline("[bola]\n(http://example.org/)\n"); assert_non_null(html); assert_string_equal(html, "bola\n"); @@ -1491,6 +1499,12 @@ test_content_parse_inline_link(void **state) assert_non_null(html); assert_string_equal(html, "bola(2)[3]**!\\\n"); free(html); + html = blogc_content_parse_inline("test suite!)\n" + "depends on [cmocka](http://cmocka.org/), though.\n"); + assert_non_null(html); + assert_string_equal(html, "test suite!)\n" + "depends on cmocka, though.\n"); + free(html); // "invalid" html = blogc_content_parse_inline("[bola](\nhttp://example.org/)\n"); assert_non_null(html); -- cgit v1.2.3-18-g5258 From 31d376735ab2aaaed0934edcce676113f83a7de7 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 21 Feb 2016 04:58:13 +0100 Subject: content-parser: fixed parser bug when handling links do not handle something like this as a valid link: [asd] asd (asd) --- tests/check_content_parser.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/check_content_parser.c') diff --git a/tests/check_content_parser.c b/tests/check_content_parser.c index e8e412a..73bbe9b 100644 --- a/tests/check_content_parser.c +++ b/tests/check_content_parser.c @@ -1487,6 +1487,14 @@ test_content_parse_inline_link(void **state) assert_non_null(html); assert_string_equal(html, "bola\n"); free(html); + html = blogc_content_parse_inline("[bola]\r\n(http://example.org/)\n"); + assert_non_null(html); + assert_string_equal(html, "bola\n"); + free(html); + html = blogc_content_parse_inline("[bola] \r\n (http://example.org/)\n"); + assert_non_null(html); + assert_string_equal(html, "bola\n"); + free(html); html = blogc_content_parse_inline("[bo\nla](http://example.org/)\n"); assert_non_null(html); assert_string_equal(html, "bo\nla\n"); @@ -1505,6 +1513,10 @@ test_content_parse_inline_link(void **state) assert_string_equal(html, "test suite!)\n" "depends on cmocka, though.\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("[bola](\nhttp://example.org/)\n"); assert_non_null(html); -- cgit v1.2.3-18-g5258 From 9902e223799f40776d1131aa0d48fc766637746e Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 21 Feb 2016 14:30:40 +0100 Subject: content-parser: added more tests --- tests/check_content_parser.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/check_content_parser.c') 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, "\"bola\"\n"); free(html); + html = blogc_content_parse_inline("![bola]\r\n(http://example.org/)\n"); + assert_non_null(html); + assert_string_equal(html, "\"bola\"\n"); + free(html); + html = blogc_content_parse_inline("![bola] \r\n (http://example.org/)\n"); + assert_non_null(html); + assert_string_equal(html, "\"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); -- cgit v1.2.3-18-g5258 From b73afb052337d3c11d90efb5e90c2818063dda4d Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 21 Feb 2016 15:13:34 +0100 Subject: content-parser: added more tests --- tests/check_content_parser.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/check_content_parser.c') diff --git a/tests/check_content_parser.c b/tests/check_content_parser.c index 048d2f2..fb56c19 100644 --- a/tests/check_content_parser.c +++ b/tests/check_content_parser.c @@ -1606,6 +1606,21 @@ test_content_parse_inline_image(void **state) assert_non_null(html); assert_string_equal(html, "\"bola\"\n"); free(html); + html = blogc_content_parse_inline( + "[![This is the image alt text](picture.jpg)](https://blogc.rgm.io)"); + assert_non_null(html); + assert_string_equal(html, + ""); + free(html); + html = blogc_content_parse_inline( + "[![This is the image alt text]\n" + "(picture.jpg)](https://blogc.rgm.io)"); + assert_non_null(html); + assert_string_equal(html, + ""); + free(html); html = blogc_content_parse_inline("asd ![bola]chunda(1234)"); assert_non_null(html); assert_string_equal(html, "asd ![bola]chunda(1234)"); -- cgit v1.2.3-18-g5258 From 437ea5b71f7a1f6cd5d09b28259a8e49acab7fbc Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 21 Feb 2016 16:43:31 +0100 Subject: man: tests: minor documentation fix and more test coverage --- tests/check_content_parser.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/check_content_parser.c') diff --git a/tests/check_content_parser.c b/tests/check_content_parser.c index fb56c19..ea069a7 100644 --- a/tests/check_content_parser.c +++ b/tests/check_content_parser.c @@ -1621,6 +1621,15 @@ test_content_parse_inline_image(void **state) ""); free(html); + html = blogc_content_parse_inline( + "[![This is the image alt text]\n" + "(picture.jpg)]\n" + "(https://blogc.rgm.io)"); + assert_non_null(html); + assert_string_equal(html, + ""); + free(html); html = blogc_content_parse_inline("asd ![bola]chunda(1234)"); assert_non_null(html); assert_string_equal(html, "asd ![bola]chunda(1234)"); -- cgit v1.2.3-18-g5258 From 3b0f9293a3432023cdca91df01418347d9781ffa Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Fri, 26 Feb 2016 01:04:32 +0100 Subject: build: replace src/utils with squareball --- tests/check_content_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/check_content_parser.c') diff --git a/tests/check_content_parser.c b/tests/check_content_parser.c index ea069a7..03f2213 100644 --- a/tests/check_content_parser.c +++ b/tests/check_content_parser.c @@ -16,7 +16,7 @@ #include #include #include "../src/content-parser.h" -#include "../src/utils/utils.h" +#include static void -- cgit v1.2.3-18-g5258 From 2bfe68f6f9fdd34588b8dde73c1a4e96c5a54b7d Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sat, 5 Mar 2016 19:35:16 +0100 Subject: content-parser: convert -- and --- to &ndash and &mdash --- tests/check_content_parser.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'tests/check_content_parser.c') diff --git a/tests/check_content_parser.c b/tests/check_content_parser.c index 03f2213..bc21317 100644 --- a/tests/check_content_parser.c +++ b/tests/check_content_parser.c @@ -106,8 +106,8 @@ test_content_parse(void **state) "1. chunda\n" "3. fuuuu\n" "\n" - "+ chunda2\n" - "+ fuuuu2\n" + "- chunda2\n" + "- fuuuu2\n" "\n" "\n" "

guda\n" "yay

\n" - "

bola

\n"); + "

bola\n" + "— foo\n" + "– bar

\n" + "

— asd

\n" + "

– lol

\n"); free(html); } @@ -194,7 +204,13 @@ test_content_parse_crlf(void **state) "guda\r\n" "yay\r\n" "\r\n" - "**bola**\r\n", &l); + "**bola**\r\n" + "-- foo\r\n" + "--- bar\r\n" + "\r\n" + "-- asd\r\n" + "\r\n" + "--- lol\r\n", &l); assert_non_null(html); assert_int_equal(l, 0); assert_string_equal(html, @@ -228,7 +244,11 @@ test_content_parse_crlf(void **state) "\r\n" "

guda\r\n" "yay

\r\n" - "

bola

\r\n"); + "

bola\r\n" + "— foo\r\n" + "– bar

\r\n" + "

— asd

\r\n" + "

– lol

\r\n"); free(html); } -- cgit v1.2.3-18-g5258 From de986bafd7d765e94059c0e88df93a352d85d7aa Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sat, 5 Mar 2016 19:39:45 +0100 Subject: content-parser: fixed a bug in previous patch --- tests/check_content_parser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/check_content_parser.c') diff --git a/tests/check_content_parser.c b/tests/check_content_parser.c index bc21317..d9d2528 100644 --- a/tests/check_content_parser.c +++ b/tests/check_content_parser.c @@ -117,7 +117,7 @@ test_content_parse(void **state) "yay\n" "\n" "**bola**\n" - "-- foo\n" + "-- foo-bar\n" "--- bar\n" "\n" "-- asd\n" @@ -157,7 +157,7 @@ test_content_parse(void **state) "

guda\n" "yay

\n" "

bola\n" - "— foo\n" + "— foo-bar\n" "– bar

\n" "

— asd

\n" "

– lol

\n"); @@ -205,7 +205,7 @@ test_content_parse_crlf(void **state) "yay\r\n" "\r\n" "**bola**\r\n" - "-- foo\r\n" + "-- foo-bar\r\n" "--- bar\r\n" "\r\n" "-- asd\r\n" @@ -245,7 +245,7 @@ test_content_parse_crlf(void **state) "

guda\r\n" "yay

\r\n" "

bola\r\n" - "— foo\r\n" + "— foo-bar\r\n" "– bar

\r\n" "

— asd

\r\n" "

– lol

\r\n"); -- cgit v1.2.3-18-g5258 From 1645987e132d063847aa95c0693570b44bb2d7d5 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sat, 5 Mar 2016 19:46:40 +0100 Subject: content-parser: fixed em/en-dash logic --- tests/check_content_parser.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/check_content_parser.c') diff --git a/tests/check_content_parser.c b/tests/check_content_parser.c index d9d2528..b20f8d0 100644 --- a/tests/check_content_parser.c +++ b/tests/check_content_parser.c @@ -157,10 +157,10 @@ test_content_parse(void **state) "

guda\n" "yay

\n" "

bola\n" - "— foo-bar\n" - "– bar

\n" - "

— asd

\n" - "

– lol

\n"); + "– foo-bar\n" + "— bar

\n" + "

– asd

\n" + "

— lol

\n"); free(html); } @@ -245,10 +245,10 @@ test_content_parse_crlf(void **state) "

guda\r\n" "yay

\r\n" "

bola\r\n" - "— foo-bar\r\n" - "– bar

\r\n" - "

— asd

\r\n" - "

– lol

\r\n"); + "– foo-bar\r\n" + "— bar

\r\n" + "

– asd

\r\n" + "

— lol

\r\n"); free(html); } -- cgit v1.2.3-18-g5258 From 001c16ac605ee65f5688534e42c10395db3f0d5a Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 17 Apr 2016 04:01:51 +0200 Subject: content-parser: do not convert -- and --- to &ndash and &mdash inside code --- tests/check_content_parser.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'tests/check_content_parser.c') diff --git a/tests/check_content_parser.c b/tests/check_content_parser.c index b20f8d0..ea3a9a2 100644 --- a/tests/check_content_parser.c +++ b/tests/check_content_parser.c @@ -1751,6 +1751,36 @@ test_content_parse_inline_line_break_crlf(void **state) } +static void +test_content_parse_inline_endash_emdash(void **state) +{ + char *html = blogc_content_parse_inline("foo -- bar"); + assert_non_null(html); + assert_string_equal(html, "foo – bar"); + free(html); + html = blogc_content_parse_inline("foo --- bar"); + assert_non_null(html); + assert_string_equal(html, "foo — bar"); + free(html); + html = blogc_content_parse_inline("`foo -- bar`"); + assert_non_null(html); + assert_string_equal(html, "foo -- bar"); + free(html); + html = blogc_content_parse_inline("`foo --- bar`"); + assert_non_null(html); + assert_string_equal(html, "foo --- bar"); + free(html); + html = blogc_content_parse_inline("``foo -- bar``"); + assert_non_null(html); + assert_string_equal(html, "foo -- bar"); + free(html); + html = blogc_content_parse_inline("``foo --- bar``"); + assert_non_null(html); + assert_string_equal(html, "foo --- bar"); + free(html); +} + + int main(void) { @@ -1793,6 +1823,7 @@ main(void) unit_test(test_content_parse_inline_image), unit_test(test_content_parse_inline_line_break), unit_test(test_content_parse_inline_line_break_crlf), + unit_test(test_content_parse_inline_endash_emdash), }; return run_tests(tests); } -- cgit v1.2.3-18-g5258 From 9b2a563b4931ca39cd6dd14bf85cda627714a4b2 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 20 Apr 2016 02:50:20 +0200 Subject: content-parser: extract post description from content description is the first line of the first paragraph parsed from content file. users can override it declaring DESCRIPTION variable in source file itself. this also fixes a bug with line endings when using single line blockquotes. --- tests/check_content_parser.c | 412 +++++++++++++++++++++++++++++++++---------- 1 file changed, 323 insertions(+), 89 deletions(-) (limited to 'tests/check_content_parser.c') diff --git a/tests/check_content_parser.c b/tests/check_content_parser.c index ea3a9a2..0eaab70 100644 --- a/tests/check_content_parser.c +++ b/tests/check_content_parser.c @@ -81,6 +81,7 @@ static void test_content_parse(void **state) { size_t l = 0; + char *d = NULL; char *html = blogc_content_parse( "# um\n" "## dois\n" @@ -122,9 +123,11 @@ test_content_parse(void **state) "\n" "-- asd\n" "\n" - "--- lol\n", &l); + "--- lol\n", &l, &d); assert_non_null(html); assert_int_equal(l, 0); + assert_non_null(d); + assert_string_equal(d, "bola"); assert_string_equal(html, "

um

\n" "

dois

\n" @@ -162,6 +165,7 @@ test_content_parse(void **state) "

– asd

\n" "

— lol

\n"); free(html); + free(d); } @@ -169,6 +173,7 @@ static void test_content_parse_crlf(void **state) { size_t l = 0; + char *d = NULL; char *html = blogc_content_parse( "# um\r\n" "## dois\r\n" @@ -210,9 +215,11 @@ test_content_parse_crlf(void **state) "\r\n" "-- asd\r\n" "\r\n" - "--- lol\r\n", &l); + "--- lol\r\n", &l, &d); assert_non_null(html); assert_int_equal(l, 0); + assert_non_null(d); + assert_string_equal(d, "bola"); assert_string_equal(html, "

um

\r\n" "

dois

\r\n" @@ -250,6 +257,7 @@ test_content_parse_crlf(void **state) "

– asd

\r\n" "

— lol

\r\n"); free(html); + free(d); } @@ -257,6 +265,7 @@ static void test_content_parse_with_excerpt(void **state) { size_t l = 0; + char *d = NULL; char *html = blogc_content_parse( "# test\n" "\n" @@ -265,9 +274,11 @@ test_content_parse_with_excerpt(void **state) "..\n" "\n" "guda\n" - "lol", &l); + "lol", &l, &d); assert_non_null(html); assert_int_equal(l, 38); + assert_non_null(d); + assert_string_equal(d, "chunda"); assert_string_equal(html, "

test

\n" "

chunda

\n" @@ -275,6 +286,8 @@ test_content_parse_with_excerpt(void **state) "lol

\n"); free(html); l = 0; + free(d); + d = NULL; html = blogc_content_parse( "# test\n" "\n" @@ -283,15 +296,18 @@ test_content_parse_with_excerpt(void **state) "...\n" "\n" "guda\n" - "lol", &l); + "lol", &l, &d); assert_non_null(html); assert_int_equal(l, 38); + assert_non_null(d); + assert_string_equal(d, "chunda"); assert_string_equal(html, "

test

\n" "

chunda

\n" "

guda\n" "lol

\n"); free(html); + free(d); } @@ -299,6 +315,7 @@ static void test_content_parse_with_excerpt_crlf(void **state) { size_t l = 0; + char *d = NULL; char *html = blogc_content_parse( "# test\r\n" "\r\n" @@ -307,9 +324,11 @@ test_content_parse_with_excerpt_crlf(void **state) "..\r\n" "\r\n" "guda\r\n" - "lol", &l); + "lol", &l, &d); assert_non_null(html); assert_int_equal(l, 40); + assert_non_null(d); + assert_string_equal(d, "chunda"); assert_string_equal(html, "

test

\r\n" "

chunda

\r\n" @@ -317,6 +336,8 @@ test_content_parse_with_excerpt_crlf(void **state) "lol

\r\n"); free(html); l = 0; + free(d); + d = NULL; html = blogc_content_parse( "# test\r\n" "\r\n" @@ -325,26 +346,29 @@ test_content_parse_with_excerpt_crlf(void **state) "...\r\n" "\r\n" "guda\r\n" - "lol", &l); + "lol", &l, &d); assert_non_null(html); assert_int_equal(l, 40); + assert_non_null(d); + assert_string_equal(d, "chunda"); assert_string_equal(html, "

test

\r\n" "

chunda

\r\n" "

guda\r\n" "lol

\r\n"); free(html); + free(d); } static void test_content_parse_header(void **state) { - char *html = blogc_content_parse("## bola", NULL); + char *html = blogc_content_parse("## bola", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola

\n"); free(html); - html = blogc_content_parse("## bola\n", NULL); + html = blogc_content_parse("## bola\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola

\n"); free(html); @@ -353,7 +377,7 @@ test_content_parse_header(void **state) "\n" "## bola\n" "\n" - "guda\n", NULL); + "guda\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola

\n" @@ -366,11 +390,11 @@ test_content_parse_header(void **state) static void test_content_parse_header_crlf(void **state) { - char *html = blogc_content_parse("## bola", NULL); + char *html = blogc_content_parse("## bola", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola

\n"); free(html); - html = blogc_content_parse("## bola\r\n", NULL); + html = blogc_content_parse("## bola\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola

\r\n"); free(html); @@ -379,7 +403,7 @@ test_content_parse_header_crlf(void **state) "\r\n" "## bola\r\n" "\r\n" - "guda\r\n", NULL); + "guda\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola

\r\n" @@ -392,11 +416,11 @@ test_content_parse_header_crlf(void **state) static void test_content_parse_html(void **state) { - char *html = blogc_content_parse("
\n
", NULL); + char *html = blogc_content_parse("
\n
", NULL, NULL); assert_non_null(html); assert_string_equal(html, "
\n
\n"); free(html); - html = blogc_content_parse("
\n
\n", NULL); + html = blogc_content_parse("
\n
\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "
\n
\n"); free(html); @@ -406,7 +430,7 @@ test_content_parse_html(void **state) "
\n" "
\n" "\n" - "chunda\n", NULL); + "chunda\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola

\n" @@ -419,11 +443,11 @@ test_content_parse_html(void **state) static void test_content_parse_html_crlf(void **state) { - char *html = blogc_content_parse("
\r\n
", NULL); + char *html = blogc_content_parse("
\r\n
", NULL, NULL); assert_non_null(html); assert_string_equal(html, "
\r\n
\r\n"); free(html); - html = blogc_content_parse("
\r\n
\r\n", NULL); + html = blogc_content_parse("
\r\n
\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "
\r\n
\r\n"); free(html); @@ -433,7 +457,7 @@ test_content_parse_html_crlf(void **state) "
\r\n" "
\r\n" "\r\n" - "chunda\r\n", NULL); + "chunda\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola

\r\n" @@ -446,27 +470,40 @@ test_content_parse_html_crlf(void **state) static void test_content_parse_blockquote(void **state) { - char *html = blogc_content_parse("> bola\n> guda", NULL); + char *html = blogc_content_parse("> bola\n> guda", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola\n" "guda

\n" "
\n"); free(html); - html = blogc_content_parse("> bola\n> guda\n", NULL); + html = blogc_content_parse("> bola\n> guda\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola\n" "guda

\n" "
\n"); free(html); + html = blogc_content_parse( + "bola\n" + "\n" + "> bola\n" + "\n" + "chunda\n", NULL, NULL); + assert_non_null(html); + assert_string_equal(html, + "

bola

\n" + "

bola

\n" + "
\n" + "

chunda

\n"); + free(html); html = blogc_content_parse( "bola\n" "\n" "> bola\n" "> guda\n" "\n" - "chunda\n", NULL); + "chunda\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola

\n" @@ -481,27 +518,40 @@ test_content_parse_blockquote(void **state) static void test_content_parse_blockquote_crlf(void **state) { - char *html = blogc_content_parse("> bola\r\n> guda", NULL); + char *html = blogc_content_parse("> bola\r\n> guda", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola\r\n" "guda

\r\n" "
\r\n"); free(html); - html = blogc_content_parse("> bola\r\n> guda\r\n", NULL); + html = blogc_content_parse("> bola\r\n> guda\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola\r\n" "guda

\r\n" "
\r\n"); free(html); + html = blogc_content_parse( + "bola\r\n" + "\r\n" + "> bola\r\n" + "\r\n" + "chunda\r\n", NULL, NULL); + assert_non_null(html); + assert_string_equal(html, + "

bola

\r\n" + "

bola

\r\n" + "
\r\n" + "

chunda

\r\n"); + free(html); html = blogc_content_parse( "bola\r\n" "\r\n" "> bola\r\n" "> guda\r\n" "\r\n" - "chunda\r\n", NULL); + "chunda\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola

\r\n" @@ -516,13 +566,13 @@ test_content_parse_blockquote_crlf(void **state) static void test_content_parse_code(void **state) { - char *html = blogc_content_parse(" bola\n guda", NULL); + char *html = blogc_content_parse(" bola\n guda", NULL, NULL); assert_non_null(html); assert_string_equal(html, "
bola\n"
         "guda
\n"); free(html); - html = blogc_content_parse(" bola\n guda\n", NULL); + html = blogc_content_parse(" bola\n guda\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "
bola\n"
@@ -534,7 +584,7 @@ test_content_parse_code(void **state)
         "   bola\n"
         "   guda\n"
         "\n"
-        "chunda\n", NULL);
+        "chunda\n", NULL, NULL);
     assert_non_null(html);
     assert_string_equal(html,
         "

bola

\n" @@ -548,13 +598,13 @@ test_content_parse_code(void **state) static void test_content_parse_code_crlf(void **state) { - char *html = blogc_content_parse(" bola\r\n guda", NULL); + char *html = blogc_content_parse(" bola\r\n guda", NULL, NULL); assert_non_null(html); assert_string_equal(html, "
bola\r\n"
         "guda
\r\n"); free(html); - html = blogc_content_parse(" bola\r\n guda\r\n", NULL); + html = blogc_content_parse(" bola\r\n guda\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "
bola\r\n"
@@ -566,7 +616,7 @@ test_content_parse_code_crlf(void **state)
         "   bola\r\n"
         "   guda\r\n"
         "\r\n"
-        "chunda\r\n", NULL);
+        "chunda\r\n", NULL, NULL);
     assert_non_null(html);
     assert_string_equal(html,
         "

bola

\r\n" @@ -580,28 +630,28 @@ test_content_parse_code_crlf(void **state) static void test_content_parse_horizontal_rule(void **state) { - char *html = blogc_content_parse("bola\nguda\n\n**", NULL); + char *html = blogc_content_parse("bola\nguda\n\n**", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola\n" "guda

\n" "
\n"); free(html); - html = blogc_content_parse("bola\nguda\n\n++++", NULL); + html = blogc_content_parse("bola\nguda\n\n++++", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola\n" "guda

\n" "
\n"); free(html); - html = blogc_content_parse("bola\nguda\n\n--\n", NULL); + html = blogc_content_parse("bola\nguda\n\n--\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola\n" "guda

\n" "
\n"); free(html); - html = blogc_content_parse("bola\nguda\n\n****\n", NULL); + html = blogc_content_parse("bola\nguda\n\n****\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola\n" @@ -613,7 +663,7 @@ test_content_parse_horizontal_rule(void **state) "\n" "**\n" "\n" - "chunda\n", NULL); + "chunda\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola

\n" @@ -625,7 +675,7 @@ test_content_parse_horizontal_rule(void **state) "\n" "----\n" "\n" - "chunda\n", NULL); + "chunda\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola

\n" @@ -638,28 +688,28 @@ test_content_parse_horizontal_rule(void **state) static void test_content_parse_horizontal_rule_crlf(void **state) { - char *html = blogc_content_parse("bola\r\nguda\r\n\r\n**", NULL); + char *html = blogc_content_parse("bola\r\nguda\r\n\r\n**", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola\r\n" "guda

\r\n" "
\r\n"); free(html); - html = blogc_content_parse("bola\r\nguda\r\n\r\n++++", NULL); + html = blogc_content_parse("bola\r\nguda\r\n\r\n++++", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola\r\n" "guda

\r\n" "
\r\n"); free(html); - html = blogc_content_parse("bola\r\nguda\r\n\r\n--\r\n", NULL); + html = blogc_content_parse("bola\r\nguda\r\n\r\n--\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola\r\n" "guda

\r\n" "
\r\n"); free(html); - html = blogc_content_parse("bola\r\nguda\r\n\r\n****\r\n", NULL); + html = blogc_content_parse("bola\r\nguda\r\n\r\n****\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola\r\n" @@ -671,7 +721,7 @@ test_content_parse_horizontal_rule_crlf(void **state) "\r\n" "**\r\n" "\r\n" - "chunda\r\n", NULL); + "chunda\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola

\r\n" @@ -683,7 +733,7 @@ test_content_parse_horizontal_rule_crlf(void **state) "\r\n" "----\r\n" "\r\n" - "chunda\r\n", NULL); + "chunda\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

bola

\r\n" @@ -701,7 +751,7 @@ test_content_parse_unordered_list(void **state) "\n" "* asd\n" "* qwe\n" - "* zxc", NULL); + "* zxc", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

lol

\n" @@ -716,7 +766,7 @@ test_content_parse_unordered_list(void **state) "\n" "* asd\n" "* qwe\n" - "* zxc\n", NULL); + "* zxc\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

lol

\n" @@ -733,7 +783,7 @@ test_content_parse_unordered_list(void **state) "* qwe\n" "* zxc\n" "\n" - "fuuuu\n", NULL); + "fuuuu\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

lol

\n" @@ -753,7 +803,7 @@ test_content_parse_unordered_list(void **state) "* zxc\n" " 1234\n" "\n" - "fuuuu\n", NULL); + "fuuuu\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

lol

\n" @@ -769,7 +819,7 @@ test_content_parse_unordered_list(void **state) html = blogc_content_parse( "* asd\n" "* qwe\n" - "* zxc", NULL); + "* zxc", NULL, NULL); assert_non_null(html); assert_string_equal(html, "
    \n" @@ -789,7 +839,7 @@ test_content_parse_unordered_list_crlf(void **state) "\r\n" "* asd\r\n" "* qwe\r\n" - "* zxc", NULL); + "* zxc", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

    lol

    \r\n" @@ -804,7 +854,7 @@ test_content_parse_unordered_list_crlf(void **state) "\r\n" "* asd\r\n" "* qwe\r\n" - "* zxc\r\n", NULL); + "* zxc\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

    lol

    \r\n" @@ -821,7 +871,7 @@ test_content_parse_unordered_list_crlf(void **state) "* qwe\r\n" "* zxc\r\n" "\r\n" - "fuuuu\r\n", NULL); + "fuuuu\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

    lol

    \r\n" @@ -841,7 +891,7 @@ test_content_parse_unordered_list_crlf(void **state) "* zxc\r\n" " 1234\r\n" "\r\n" - "fuuuu\r\n", NULL); + "fuuuu\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

    lol

    \r\n" @@ -857,7 +907,7 @@ test_content_parse_unordered_list_crlf(void **state) html = blogc_content_parse( "* asd\r\n" "* qwe\r\n" - "* zxc", NULL); + "* zxc", NULL, NULL); assert_non_null(html); assert_string_equal(html, "
      \r\n" @@ -877,7 +927,7 @@ test_content_parse_ordered_list(void **state) "\n" "1. asd\n" "2. qwe\n" - "3. zxc", NULL); + "3. zxc", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

      lol

      \n" @@ -892,7 +942,7 @@ test_content_parse_ordered_list(void **state) "\n" "1. asd\n" "2. qwe\n" - "3. zxc\n", NULL); + "3. zxc\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

      lol

      \n" @@ -909,7 +959,7 @@ test_content_parse_ordered_list(void **state) "2. qwe\n" "3. zxc\n" "\n" - "fuuuu\n", NULL); + "fuuuu\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

      lol

      \n" @@ -929,7 +979,7 @@ test_content_parse_ordered_list(void **state) "3. zxc\n" " 1234\n" "\n" - "fuuuu\n", NULL); + "fuuuu\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

      lol

      \n" @@ -945,7 +995,7 @@ test_content_parse_ordered_list(void **state) html = blogc_content_parse( "1. asd\n" "2. qwe\n" - "3. zxc", NULL); + "3. zxc", NULL, NULL); assert_non_null(html); assert_string_equal(html, "
        \n" @@ -965,7 +1015,7 @@ test_content_parse_ordered_list_crlf(void **state) "\r\n" "1. asd\r\n" "2. qwe\r\n" - "3. zxc", NULL); + "3. zxc", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

        lol

        \r\n" @@ -980,7 +1030,7 @@ test_content_parse_ordered_list_crlf(void **state) "\r\n" "1. asd\r\n" "2. qwe\r\n" - "3. zxc\r\n", NULL); + "3. zxc\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

        lol

        \r\n" @@ -997,7 +1047,7 @@ test_content_parse_ordered_list_crlf(void **state) "2. qwe\r\n" "3. zxc\r\n" "\r\n" - "fuuuu\r\n", NULL); + "fuuuu\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

        lol

        \r\n" @@ -1017,7 +1067,7 @@ test_content_parse_ordered_list_crlf(void **state) "3. zxc\r\n" " 1234\r\n" "\r\n" - "fuuuu\r\n", NULL); + "fuuuu\r\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

        lol

        \r\n" @@ -1033,7 +1083,7 @@ test_content_parse_ordered_list_crlf(void **state) html = blogc_content_parse( "1. asd\r\n" "2. qwe\r\n" - "3. zxc", NULL); + "3. zxc", NULL, NULL); assert_non_null(html); assert_string_equal(html, "
          \r\n" @@ -1045,10 +1095,177 @@ test_content_parse_ordered_list_crlf(void **state) } +static void +test_content_parse_description(void **state) +{ + char *d = NULL; + char *html = blogc_content_parse( + "# foo\n" + "\n" + "bar", NULL, &d); + assert_non_null(html); + assert_string_equal(html, + "

          foo

          \n" + "

          bar

          \n"); + assert_non_null(d); + assert_string_equal(d, "bar"); + free(html); + free(d); + d = NULL; + html = blogc_content_parse( + "# foo\n" + "\n" + "bar\n", NULL, &d); + assert_non_null(html); + assert_string_equal(html, + "

          foo

          \n" + "

          bar

          \n"); + assert_non_null(d); + assert_string_equal(d, "bar"); + free(html); + free(d); + d = NULL; + html = blogc_content_parse( + "# foo\n" + "\n" + "qwe\n" + "bar\n", NULL, &d); + assert_non_null(html); + assert_string_equal(html, + "

          foo

          \n" + "

          qwe\n" + "bar

          \n"); + assert_non_null(d); + assert_string_equal(d, "qwe"); + free(html); + free(d); + d = NULL; + html = blogc_content_parse( + "# foo\n" + "\n" + "> qwe\n" + "\n" + "bar\n", NULL, &d); + assert_non_null(html); + assert_string_equal(html, + "

          foo

          \n" + "

          qwe

          \n" + "
          \n" + "

          bar

          \n"); + assert_non_null(d); + assert_string_equal(d, "qwe"); + free(html); + free(d); + d = NULL; + html = blogc_content_parse( + "# foo\n" + "\n" + "> qwe\n" + "> zxc\n" + "\n" + "bar\n", NULL, &d); + assert_non_null(html); + assert_string_equal(html, + "

          foo

          \n" + "

          qwe\n" + "zxc

          \n" + "
          \n" + "

          bar

          \n"); + assert_non_null(d); + assert_string_equal(d, "qwe"); + free(html); + free(d); +} + + +static void +test_content_parse_description_crlf(void **state) +{ + char *d = NULL; + char *html = blogc_content_parse( + "# foo\r\n" + "\r\n" + "bar", NULL, &d); + assert_non_null(html); + assert_string_equal(html, + "

          foo

          \r\n" + "

          bar

          \r\n"); + assert_non_null(d); + assert_string_equal(d, "bar"); + free(html); + free(d); + d = NULL; + html = blogc_content_parse( + "# foo\r\n" + "\r\n" + "bar\r\n", NULL, &d); + assert_non_null(html); + assert_string_equal(html, + "

          foo

          \r\n" + "

          bar

          \r\n"); + assert_non_null(d); + assert_string_equal(d, "bar"); + free(html); + free(d); + d = NULL; + html = blogc_content_parse( + "# foo\r\n" + "\r\n" + "qwe\r\n" + "bar\r\n", NULL, &d); + assert_non_null(html); + assert_string_equal(html, + "

          foo

          \r\n" + "

          qwe\r\n" + "bar

          \r\n"); + assert_non_null(d); + assert_string_equal(d, "qwe"); + free(html); + free(d); + d = NULL; + html = blogc_content_parse( + "# foo\r\n" + "\r\n" + "> qwe\r\n" + "\r\n" + "bar\r\n", NULL, &d); + assert_non_null(html); + assert_string_equal(html, + "

          foo

          \r\n" + "

          qwe

          \r\n" + "
          \r\n" + "

          bar

          \r\n"); + assert_non_null(d); + assert_string_equal(d, "qwe"); + free(html); + free(d); + d = NULL; + html = blogc_content_parse( + "# foo\r\n" + "\r\n" + "> qwe\r\n" + "> zxc\r\n" + "\r\n" + "bar\r\n", NULL, &d); + assert_non_null(html); + assert_string_equal(html, + "

          foo

          \r\n" + "

          qwe\r\n" + "zxc

          \r\n" + "
          \r\n" + "

          bar

          \r\n"); + assert_non_null(d); + assert_string_equal(d, "qwe"); + free(html); + free(d); +} + + static void test_content_parse_invalid_excerpt(void **state) { size_t l = 0; + char *d = NULL; char *html = blogc_content_parse( "# test\n" "\n" @@ -1056,9 +1273,11 @@ test_content_parse_invalid_excerpt(void **state) "..\n" "\n" "guda\n" - "lol", &l); + "lol", &l, &d); assert_non_null(html); assert_int_equal(l, 0); + assert_non_null(d); + assert_string_equal(d, "chunda"); assert_string_equal(html, "

          test

          \n" "

          chunda\n" @@ -1067,6 +1286,8 @@ test_content_parse_invalid_excerpt(void **state) "lol

          \n"); free(html); l = 0; + free(d); + d = NULL; html = blogc_content_parse( "# test\n" "\n" @@ -1074,9 +1295,11 @@ test_content_parse_invalid_excerpt(void **state) "\n" "...\n" "guda\n" - "lol", &l); + "lol", &l, &d); assert_non_null(html); assert_int_equal(l, 0); + assert_non_null(d); + assert_string_equal(d, "chunda"); assert_string_equal(html, "

          test

          \n" "

          chunda

          \n" @@ -1085,15 +1308,19 @@ test_content_parse_invalid_excerpt(void **state) "lol

          \n"); free(html); l = 0; + free(d); + d = NULL; html = blogc_content_parse( "# test\n" "\n" "chunda..\n" "\n" "guda\n" - "lol", &l); + "lol", &l, &d); assert_non_null(html); assert_int_equal(l, 0); + assert_non_null(d); + assert_string_equal(d, "chunda.."); assert_string_equal(html, "

          test

          \n" "

          chunda..

          \n" @@ -1101,21 +1328,26 @@ test_content_parse_invalid_excerpt(void **state) "lol

          \n"); free(html); l = 0; + free(d); + d = NULL; html = blogc_content_parse( "# test\n" "\n" "chunda\n" "\n" "...guda\n" - "lol", &l); + "lol", &l, &d); assert_non_null(html); assert_int_equal(l, 0); + assert_non_null(d); + assert_string_equal(d, "chunda"); assert_string_equal(html, "

          test

          \n" "

          chunda

          \n" "

          ...guda\n" "lol

          \n"); free(html); + free(d); } @@ -1125,7 +1357,7 @@ test_content_parse_invalid_header(void **state) char *html = blogc_content_parse( "asd\n" "\n" - "##bola\n", NULL); + "##bola\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          asd

          \n" @@ -1142,7 +1374,7 @@ test_content_parse_invalid_header_empty(void **state) "\n" "##\n" "\n" - "qwe\n", NULL); + "qwe\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          asd

          \n" @@ -1159,7 +1391,7 @@ test_content_parse_invalid_blockquote(void **state) char *html = blogc_content_parse( "> asd\n" "> bola\n" - "> foo\n", NULL); + "> foo\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          > asd\n" @@ -1168,7 +1400,7 @@ test_content_parse_invalid_blockquote(void **state) free(html); html = blogc_content_parse( "> asd\n" - "> bola", NULL); + "> bola", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          > asd\n" @@ -1183,7 +1415,7 @@ test_content_parse_invalid_code(void **state) char *html = blogc_content_parse( " asd\n" " bola\n" - " foo\n", NULL); + " foo\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          asd\n" @@ -1193,7 +1425,7 @@ test_content_parse_invalid_code(void **state) html = blogc_content_parse( " asd\n" " bola\n" - " foo", NULL); + " foo", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          asd\n" @@ -1207,11 +1439,11 @@ static void test_content_parse_invalid_horizontal_rule(void **state) { // this generates invalid html, but... - char *html = blogc_content_parse("** asd", NULL); + char *html = blogc_content_parse("** asd", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          asd

          \n"); free(html); - html = blogc_content_parse("** asd\n", NULL); + html = blogc_content_parse("** asd\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          asd

          \n"); free(html); @@ -1224,7 +1456,7 @@ test_content_parse_invalid_unordered_list(void **state) // more invalid html char *html = blogc_content_parse( "* asd\n" - "1. qwe", NULL); + "1. qwe", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          asd\n" @@ -1233,7 +1465,7 @@ test_content_parse_invalid_unordered_list(void **state) html = blogc_content_parse( "* asd\n" "1. qwe\n" - "\n", NULL); + "\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          asd\n" @@ -1241,7 +1473,7 @@ test_content_parse_invalid_unordered_list(void **state) free(html); html = blogc_content_parse( "* asd\n" - "1. qwe\n", NULL); + "1. qwe\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          asd\n" @@ -1250,7 +1482,7 @@ test_content_parse_invalid_unordered_list(void **state) free(html); html = blogc_content_parse( "* asd\n" - "1. qwe\n", NULL); + "1. qwe\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          asd\n" @@ -1263,7 +1495,7 @@ test_content_parse_invalid_unordered_list(void **state) "* asd\n" "1. qwe\n" "\n" - "poi\n", NULL); + "poi\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          chunda

          \n" @@ -1280,7 +1512,7 @@ test_content_parse_invalid_ordered_list(void **state) // more invalid html char *html = blogc_content_parse( "1. asd\n" - "* qwe", NULL); + "* qwe", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          1. asd\n" @@ -1289,7 +1521,7 @@ test_content_parse_invalid_ordered_list(void **state) html = blogc_content_parse( "1. asd\n" "* qwe\n" - "\n", NULL); + "\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          1. asd\n" @@ -1297,7 +1529,7 @@ test_content_parse_invalid_ordered_list(void **state) free(html); html = blogc_content_parse( "1. asd\n" - "* qwe\n", NULL); + "* qwe\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          1. asd\n" @@ -1306,7 +1538,7 @@ test_content_parse_invalid_ordered_list(void **state) free(html); html = blogc_content_parse( "1. asd\n" - "* qwe\n", NULL); + "* qwe\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          1. asd\n" @@ -1319,7 +1551,7 @@ test_content_parse_invalid_ordered_list(void **state) "1. asd\n" "* qwe\n" "\n" - "poi\n", NULL); + "poi\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          chunda

          \n" @@ -1329,7 +1561,7 @@ test_content_parse_invalid_ordered_list(void **state) free(html); html = blogc_content_parse( "1 asd\n" - "* qwe\n", NULL); + "* qwe\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          1 asd\n" @@ -1337,7 +1569,7 @@ test_content_parse_invalid_ordered_list(void **state) free(html); html = blogc_content_parse( "a. asd\n" - "2. qwe\n", NULL); + "2. qwe\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          a. asd\n" @@ -1345,18 +1577,18 @@ test_content_parse_invalid_ordered_list(void **state) free(html); html = blogc_content_parse( "1.\nasd\n" - "2. qwe\n", NULL); + "2. qwe\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          1.\n" "asd\n" "2. qwe

          \n"); free(html); - html = blogc_content_parse("1.\n", NULL); + html = blogc_content_parse("1.\n", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          1.

          \n"); free(html); - html = blogc_content_parse("1 ", NULL); + html = blogc_content_parse("1 ", NULL, NULL); assert_non_null(html); assert_string_equal(html, "

          1

          \n"); free(html); @@ -1806,6 +2038,8 @@ main(void) unit_test(test_content_parse_unordered_list_crlf), unit_test(test_content_parse_ordered_list), unit_test(test_content_parse_ordered_list_crlf), + unit_test(test_content_parse_description), + unit_test(test_content_parse_description_crlf), unit_test(test_content_parse_invalid_excerpt), unit_test(test_content_parse_invalid_header), unit_test(test_content_parse_invalid_header_empty), -- cgit v1.2.3-18-g5258 From 9699bf0ce6b34c0d05c509925f3367f2200caad5 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 27 Apr 2016 02:34:19 +0200 Subject: remove squareball for good --- tests/check_content_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/check_content_parser.c') diff --git a/tests/check_content_parser.c b/tests/check_content_parser.c index 0eaab70..2444ebb 100644 --- a/tests/check_content_parser.c +++ b/tests/check_content_parser.c @@ -16,7 +16,7 @@ #include #include #include "../src/content-parser.h" -#include +#include "../src/utils.h" static void -- cgit v1.2.3-18-g5258