summaryrefslogtreecommitdiff
path: root/api_test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-01-08 13:17:02 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2016-01-08 13:17:02 -0800
commit56501dc4d3f8d33c13ca833d2386a445ecde7435 (patch)
tree2c39d3b09a3aef7081b285260740ab4d81a9e2c9 /api_test
parenta389902278feefde988935353acb1a52d978df9b (diff)
Added an api_test that segfaults.
render_commonmark on a non-block node. Still don't know why.
Diffstat (limited to 'api_test')
-rw-r--r--api_test/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/api_test/main.c b/api_test/main.c
index c2c5ee2..80788e1 100644
--- a/api_test/main.c
+++ b/api_test/main.c
@@ -674,6 +674,16 @@ static void render_commonmark(test_batch_runner *runner) {
" ut labore et dolore magna aliqua.\n",
"render document without wrapping");
free(commonmark);
+
+ /* TODO segfaults */
+ cmark_node *text = cmark_node_new(CMARK_NODE_TEXT);
+ cmark_node_set_literal(text, "Hi");
+ commonmark = cmark_render_commonmark(text, CMARK_OPT_DEFAULT, 0);
+ STR_EQ(runner, commonmark, "Hi\n",
+ "render single inline node");
+ free(commonmark);
+
+ cmark_node_free(text);
cmark_node_free(doc);
}