mirror of
https://github.com/quitesimpleorg/qsmaddy.git
synced 2024-11-23 15:57:51 +01:00
test_maddy_italicparser: Add tests for the italic parser
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
parent
9b37255346
commit
e8ba8f661a
23
tests/maddy/test_maddy_italicparser.cpp
Normal file
23
tests/maddy/test_maddy_italicparser.cpp
Normal file
@ -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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user