From 1961ae06e96f1111f9c4316d9d08fc485008935f Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Fri, 28 Nov 2014 15:36:19 +0100 Subject: Test that libcmark can be used by C++ code --- api_test/cplusplus.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 api_test/cplusplus.cpp (limited to 'api_test/cplusplus.cpp') 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 + +#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, "

paragraph

\n", "libcmark works with C++"); + free(html); +} + -- cgit v1.2.3