Commit 81fee606 authored by Laurent Montel's avatar Laurent Montel 😁

Add more autotest (but not success to reproduce my bugs)

parent ef1018d2
......@@ -67,7 +67,7 @@ void RichTextComposerSignaturesTest::shouldCleanSignature()
void RichTextComposerSignaturesTest::shouldReplaceSignatureWhenText()
{
MessageComposer::RichTextComposerNg richtextComposerNg;
richtextComposerNg.setText(QStringLiteral("foo\n"));
richtextComposerNg.setText(QStringLiteral("foo\nbla \nfoo"));
richtextComposerNg.createActions(new KActionCollection(this));
MessageComposer::RichTextComposerSignatures *composerSignature = richtextComposerNg.composerSignature();
QVERIFY(composerSignature);
......@@ -87,12 +87,13 @@ void RichTextComposerSignaturesTest::shouldReplaceSignatureWhenText()
composerSignature->replaceSignature(signature1, signature2);
QCOMPARE(richtextComposerNg.toPlainText(), QStringLiteral("foo\n--\nbla Bla "));
const QString result = QStringLiteral("foo\nbla\nfoo--\nbla Bla ");
QCOMPARE(richtextComposerNg.toPlainText(), result);
for (int i = 0; i < 10; i++) {
composerSignature->replaceSignature(signature2, signature1);
composerSignature->replaceSignature(signature1, signature2);
}
QCOMPARE(richtextComposerNg.toPlainText(), QStringLiteral("foo\n--\nbla Bla "));
QCOMPARE(richtextComposerNg.toPlainText(), result);
}
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