From 9add3c1748710b8ee996aca19136b80097856cc7 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 25 Aug 2017 14:12:03 -0600 Subject: Encoding tests --- framework/src/domain/mime/tests/mailtemplatetest.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'framework/src/domain/mime/tests') diff --git a/framework/src/domain/mime/tests/mailtemplatetest.cpp b/framework/src/domain/mime/tests/mailtemplatetest.cpp index 098c34bc..1fff4c78 100644 --- a/framework/src/domain/mime/tests/mailtemplatetest.cpp +++ b/framework/src/domain/mime/tests/mailtemplatetest.cpp @@ -126,6 +126,17 @@ private slots: QCOMPARE(unquote(removeFirstLine(result->body())), QLatin1String("HTML text")); } + void testHtml8BitEncodedReply() + { + auto msg = readMail("8bitencoded.mbox"); + KMime::Message::Ptr result; + MailTemplates::reply(msg, [&] (const KMime::Message::Ptr &r) { + result = r; + }); + QTRY_VERIFY(result); + QVERIFY(MailTemplates::plaintextContent(result).contains(QString::fromUtf8("Why Pisa’s Tower"))); + } + void testMultipartSignedReply() { auto msg = readMail("openpgp-signed-mailinglist.mbox"); -- cgit v1.2.3