From e8ba8f661af7fe966ac105f6f37358a7a0a22ef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Fri, 19 Oct 2018 11:50:04 -0300 Subject: [PATCH] test_maddy_italicparser: Add tests for the italic parser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- tests/maddy/test_maddy_italicparser.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/maddy/test_maddy_italicparser.cpp diff --git a/tests/maddy/test_maddy_italicparser.cpp b/tests/maddy/test_maddy_italicparser.cpp new file mode 100644 index 0000000..c87f266 --- /dev/null +++ b/tests/maddy/test_maddy_italicparser.cpp @@ -0,0 +1,23 @@ +/* + * This project is licensed under the MIT license. For more information see the + * LICENSE file. + */ +#include + +#include "gmock/gmock.h" + +#include "maddy/italicparser.h" + +// ----------------------------------------------------------------------------- + +TEST(MADDY_ITALICPARSER, ItReplacesMarkdownWithItalicHTML) +{ + + std::string text = "some text *bla* text testing *it* out"; + std::string expected = "some text bla text testing it out"; + auto italicParser = std::make_shared(); + + italicParser->Parse(text); + + ASSERT_EQ(text, expected); +}