diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2014-11-28 15:36:19 +0100 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2014-11-28 15:40:35 +0100 |
commit | 1961ae06e96f1111f9c4316d9d08fc485008935f (patch) | |
tree | ab854f7e3fcb34c7983313885f2b7342bcc03a33 /api_test/cplusplus.cpp | |
parent | 572608d158772cef6562b8c34f370fff98855174 (diff) |
Test that libcmark can be used by C++ code
Diffstat (limited to 'api_test/cplusplus.cpp')
-rw-r--r-- | api_test/cplusplus.cpp | 15 |
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); +} + |