/* * This project is licensed under the MIT license. For more information see the * LICENSE file. */ #include #include "gmock/gmock.h" #include "maddy/strikethroughparser.h" // ----------------------------------------------------------------------------- TEST(MADDY_STRIKETHROUGHPARSER, ItReplacesMarkdownWithStrikeThroughHTML) { std::string text = "some text ~~bla~~ text testing ~~it~~ out"; std::string expected = "some text bla text testing it out"; auto strikeThroughParser = std::make_shared(); strikeThroughParser->Parse(text); ASSERT_EQ(expected, text); } TEST(MADDY_STRIKETHROUGHPARSER, ItDoesNotParseInsideInlineCode) { std::string text = "some text `~~bla~~` text testing ~~it~~ out"; std::string expected = "some text `~~bla~~` text testing ~~it~~ out"; auto strikeThroughParser = std::make_shared(); strikeThroughParser->Parse(text); ASSERT_EQ(expected, text); }