summaryrefslogtreecommitdiff
path: root/api_test/cplusplus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'api_test/cplusplus.cpp')
-rw-r--r--api_test/cplusplus.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/api_test/cplusplus.cpp b/api_test/cplusplus.cpp
new file mode 100644
index 0000000..ea64b06
--- /dev/null
+++ b/api_test/cplusplus.cpp
@@ -0,0 +1,15 @@
+#include <cstdlib>
+
+#include "cmark.h"
+
+#include "harness.h"
+
+extern "C" void
+test_cplusplus(test_batch_runner *runner)
+{
+ static const char md[] = "paragraph\n";
+ char *html = cmark_markdown_to_html(md, sizeof(md) - 1);
+ STR_EQ(runner, html, "<p>paragraph</p>\n", "libcmark works with C++");
+ free(html);
+}
+