Commit 5313b673 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add autotest for Bug 436880

(cherry picked from commit 098b6bc5)
parent 1e83e283
......@@ -909,3 +909,22 @@ void TextHTMLBuilderTest::testBug421908_full()
delete hb;
delete doc;
}
void TextHTMLBuilderTest::testBug436880()
{
auto doc = new QTextDocument();
doc->setHtml(QStringLiteral("<p dir='rtl'>test</ p>"));
auto hb = new KPIMTextEdit::TextHTMLBuilder();
auto md = new KPIMTextEdit::MarkupDirector(hb);
md->processDocument(doc);
auto result = hb->getResult();
qDebug() << " result " << result;
auto regex = QRegularExpression(QStringLiteral("^<p dir='rtl' style=\"margin-top:12;margin-bottom:12;margin-left:0;margin-right:0;\">test</p>\n"));
QVERIFY(regex.match(result).hasMatch());
delete md;
delete hb;
delete doc;
}
......@@ -47,6 +47,7 @@ private Q_SLOTS:
void testBug421908();
void testBug421908_2();
void testBug421908_full();
void testBug436880();
};
#endif // TEXTHTMLBUILDERTEST_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment