1
0
镜像自地址 https://github.com/quitesimpleorg/qsmaddy.git 已同步 2024-11-24 00:02:36 +01:00

test_maddy_italicparser: Add tests for the italic parser

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
这个提交包含在:
Patrick José Pereira 2018-10-19 11:50:04 -03:00
父节点 9b37255346
当前提交 e8ba8f661a

查看文件

@ -0,0 +1,23 @@
/*
* This project is licensed under the MIT license. For more information see the
* LICENSE file.
*/
#include <memory>
#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 <i>bla</i> text testing <i>it</i> out";
auto italicParser = std::make_shared<maddy::ItalicParser>();
italicParser->Parse(text);
ASSERT_EQ(text, expected);
}