aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-05-31 07:30:58 +0200
committerMontel Laurent <[email protected]>2017-05-31 07:30:58 +0200
commit1ec03fa047b284b1f21fe680bbe95c05bd9cb430 (patch)
tree170d7fc14b5b6abc8cba41fabaf2f6b5512e21b7
parentd2e7284a3992eb3ca89706ae52a8933af765112f (diff)
Add autotest with broken mimetype
-rw-r--r--autotests/contenttest.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/autotests/contenttest.cpp b/autotests/contenttest.cpp
index 001d451..605018d 100644
--- a/autotests/contenttest.cpp
+++ b/autotests/contenttest.cpp
@@ -787,6 +787,21 @@ void ContentTest::testContentTypeMimetype_data()
"Git commit 5410a2b3b6eef29ba32d0ac5e363fd38a56f535b by Montel Laurent.\n"
"Committed on 30/05/2017 at 19:25.\n";
QTest::newRow("text/plain") << data << QByteArrayLiteral("text/plain");
+
+ data =
+ "From: Montel Laurent <[email protected]>\n"
+ "Content-Type: %22%22%22%22%22%22%22%22%22%22%22%22%22%22%22%22=?windows-1252?q?ap%22/pdf;\n"
+ "name=\"file.pdf\"\n"
+ "MIME-Version: 1.0\n"
+ "Content-Transfer-Encoding: quoted-printable\n"
+ "Subject: [libksieve] src/ksieveui: coding style\n"
+ "Date: Tue, 30 May 2017 19:25:59 +0000\n"
+ "\n"
+ "Git commit 5410a2b3b6eef29ba32d0ac5e363fd38a56f535b by Montel Laurent.\n"
+ "Committed on 30/05/2017 at 19:25.\n";
+ QTest::newRow("broken") << data << QByteArrayLiteral("text/plain");
+
}
@@ -799,5 +814,6 @@ void ContentTest::testContentTypeMimetype()
Message *msg = new Message();
msg->setContent(data);
msg->parse();
+ QEXPECT_FAIL("broken", "Problem with content type", Continue);
QCOMPARE(msg->contentType(false)->mimeType(), mimetype);
}