From b637b19f456ee721873386e91204240b037e1024 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 11 Jul 2016 22:37:31 +0100 Subject: Modified api_test for change in "two blanks break out of a list." --- api_test/main.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'api_test') 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" "
html
\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), "
html
\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) { "
  • Item 1
  • \n" "
  • Item 2
  • \n" "\n" - "
    CODE\n"
    -      "
    \n" "
    FENCED\n"
           "
    \n" + "
    CODE\n"
    +      "
    \n" "
    HTML
    \n" "

    LINK

    \n"; STR_EQ(runner, rendered_html, expected_html, "setters work"); -- cgit v1.2.3