summaryrefslogtreecommitdiff
path: root/api_test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-07-11 22:37:31 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2016-07-11 22:37:31 +0100
commitb637b19f456ee721873386e91204240b037e1024 (patch)
tree0963fde9c4455cd03751ebccc4f7828a295c83a6 /api_test
parente9c53bbdfa14c7a43cc8bb78cd6cc56ea86b03db (diff)
Modified api_test for change in "two blanks break out of a list."
Diffstat (limited to 'api_test')
-rw-r--r--api_test/main.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/api_test/main.c b/api_test/main.c
index 94051e9..d493e00 100644
--- a/api_test/main.c
+++ b/api_test/main.c
@@ -83,12 +83,10 @@ static void accessors(test_batch_runner *runner) {
"\n"
"3. Item 2\n"
"\n"
- "\n"
- " code\n"
- "\n"
"``` lang\n"
"fenced\n"
"```\n"
+ " code\n"
"\n"
"<div>html</div>\n"
"\n"
@@ -117,23 +115,23 @@ static void accessors(test_batch_runner *runner) {
INT_EQ(runner, cmark_node_get_list_tight(ordered_list), 0,
"get_list_tight loose");
- cmark_node *code = cmark_node_next(ordered_list);
- STR_EQ(runner, cmark_node_get_literal(code), "code\n",
- "get_literal indented code");
-
- cmark_node *fenced = cmark_node_next(code);
+ cmark_node *fenced = cmark_node_next(ordered_list);
STR_EQ(runner, cmark_node_get_literal(fenced), "fenced\n",
"get_literal fenced code");
STR_EQ(runner, cmark_node_get_fence_info(fenced), "lang", "get_fence_info");
- cmark_node *html = cmark_node_next(fenced);
+ cmark_node *code = cmark_node_next(fenced);
+ STR_EQ(runner, cmark_node_get_literal(code), "code\n",
+ "get_literal indented code");
+
+ cmark_node *html = cmark_node_next(code);
STR_EQ(runner, cmark_node_get_literal(html), "<div>html</div>\n",
"get_literal html");
cmark_node *paragraph = cmark_node_next(html);
- INT_EQ(runner, cmark_node_get_start_line(paragraph), 19, "get_start_line");
+ INT_EQ(runner, cmark_node_get_start_line(paragraph), 17, "get_start_line");
INT_EQ(runner, cmark_node_get_start_column(paragraph), 1, "get_start_column");
- INT_EQ(runner, cmark_node_get_end_line(paragraph), 19, "get_end_line");
+ INT_EQ(runner, cmark_node_get_end_line(paragraph), 17, "get_end_line");
cmark_node *link = cmark_node_first_child(paragraph);
STR_EQ(runner, cmark_node_get_url(link), "url", "get_url");
@@ -194,10 +192,10 @@ static void accessors(test_batch_runner *runner) {
"<li>Item 1</li>\n"
"<li>Item 2</li>\n"
"</ul>\n"
- "<pre><code>CODE\n"
- "</code></pre>\n"
"<pre><code class=\"language-LANG\">FENCED\n"
"</code></pre>\n"
+ "<pre><code>CODE\n"
+ "</code></pre>\n"
"<div>HTML</div>\n"
"<p><a href=\"URL\" title=\"TITLE\">LINK</a></p>\n";
STR_EQ(runner, rendered_html, expected_html, "setters work");