summaryrefslogtreecommitdiff
path: root/api_test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-12-28 20:45:35 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-12-28 20:52:17 -0800
commit96c7df6a8480b78ddc2540dd85877487af358ceb (patch)
tree548174d5a2fa85dcae0cd93be2ea41e1eeb10bd1 /api_test
parent2875252bf83c7a0f26ee940e5c29920b290d615f (diff)
Added cmark_node_set_list_delim, cmark_node_get_list_delim.
Even though this doesn't make a difference in default HTML output, it's worth keeping track; some output formats may allow you to distinguish lists with `1)` and with `1.` delimiters.
Diffstat (limited to 'api_test')
-rw-r--r--api_test/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/api_test/main.c b/api_test/main.c
index 88f7cef..b098c41 100644
--- a/api_test/main.c
+++ b/api_test/main.c
@@ -75,6 +75,9 @@ constructor(test_batch_runner *runner)
INT_EQ(runner, cmark_node_get_list_type(node),
CMARK_BULLET_LIST,
"default is list type is bullet");
+ INT_EQ(runner, cmark_node_get_list_delim(node),
+ CMARK_NO_DELIM,
+ "default is list delim is NO_DELIM");
INT_EQ(runner, cmark_node_get_list_start(node), 1,
"default is list start is 1");
INT_EQ(runner, cmark_node_get_list_tight(node), 0,
@@ -130,6 +133,8 @@ accessors(test_batch_runner *runner)
cmark_node *ordered_list = cmark_node_next(bullet_list);
INT_EQ(runner, cmark_node_get_list_type(ordered_list),
CMARK_ORDERED_LIST, "get_list_type ordered");
+ INT_EQ(runner, cmark_node_get_list_delim(ordered_list),
+ CMARK_PERIOD_DELIM, "get_list_delim ordered");
INT_EQ(runner, cmark_node_get_list_start(ordered_list), 2,
"get_list_start");
INT_EQ(runner, cmark_node_get_list_tight(ordered_list), 0,
@@ -174,6 +179,8 @@ accessors(test_batch_runner *runner)
OK(runner, cmark_node_set_list_type(bullet_list, CMARK_ORDERED_LIST),
"set_list_type ordered");
+ OK(runner, cmark_node_set_list_delim(bullet_list, CMARK_PAREN_DELIM),
+ "set_list_delim paren");
OK(runner, cmark_node_set_list_start(bullet_list, 3),
"set_list_start");
OK(runner, cmark_node_set_list_tight(bullet_list, 0),