Commit cdfd44e6 authored by Laurent Montel's avatar Laurent Montel 😁

Start to create autotest for content-type

parent 06301341
......@@ -743,3 +743,40 @@ void ContentTest::testFreezing()
delete msg;
void ContentTest::testContentTypeMimetype()
//TODO improve test
QByteArray data =
"From: Nathaniel Borenstein <>\n"
"To: Ned Freed <>\n"
"Date: Sun, 21 Mar 1993 23:56:48 -0800 (PST)\n"
"Subject: Sample message\n"
"MIME-Version: 1.0\n"
"Content-type: multipart/mixed; boundary=\"simple boundary\"\n"
"This is the preamble. It is to be ignored, though it\n"
"is a handy place for composition agents to include an\n"
"explanatory note to non-MIME conformant readers.\n"
"--simple boundary\n"
"This is implicitly typed plain US-ASCII text.\n"
"It does NOT end with a linebreak.\n"
"--simple boundary\n"
"Content-type: text/plain; charset=us-ascii\n"
"This is explicitly typed plain US-ASCII text.\n"
"It DOES end with a linebreak.\n"
"--simple boundary--\n"
"This is the epilogue. It is also to be ignored.\n";
// test parsing
Message *msg = new Message();
QCOMPARE(msg->contentType(false)->mimeType(), QByteArrayLiteral("multipart/mixed"));
......@@ -44,6 +44,7 @@ private Q_SLOTS:
// TODO: grab samples from and make a Yenc test
void testParent();
void testFreezing();
void testContentTypeMimetype();
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