summaryrefslogtreecommitdiffstats
path: root/framework/domain/mimetreeparser/tests/interfacetest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'framework/domain/mimetreeparser/tests/interfacetest.cpp')
-rw-r--r--framework/domain/mimetreeparser/tests/interfacetest.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/framework/domain/mimetreeparser/tests/interfacetest.cpp b/framework/domain/mimetreeparser/tests/interfacetest.cpp
index fb073fc1..ac77b025 100644
--- a/framework/domain/mimetreeparser/tests/interfacetest.cpp
+++ b/framework/domain/mimetreeparser/tests/interfacetest.cpp
@@ -145,6 +145,8 @@ private slots:
145 QCOMPARE(contentList.size(), 1); 145 QCOMPARE(contentList.size(), 1);
146 QCOMPARE(contentList[0]->content(), QStringLiteral("The quick brown fox jumped over the lazy dog.").toLocal8Bit()); 146 QCOMPARE(contentList[0]->content(), QStringLiteral("The quick brown fox jumped over the lazy dog.").toLocal8Bit());
147 QCOMPARE(contentList[0]->charset(), QStringLiteral("utf-8").toLocal8Bit()); 147 QCOMPARE(contentList[0]->charset(), QStringLiteral("utf-8").toLocal8Bit());
148 QCOMPARE(contentList[0]->encryptions().size(), 1);
149 QCOMPARE(contentList[0]->signatures().size(), 0);
148 auto contentAttachmentList = parser.collectAttachmentParts(); 150 auto contentAttachmentList = parser.collectAttachmentParts();
149 QCOMPARE(contentAttachmentList.size(), 0); 151 QCOMPARE(contentAttachmentList.size(), 0);
150 } 152 }
@@ -162,12 +164,18 @@ private slots:
162 QCOMPARE(contentList.size(), 1); 164 QCOMPARE(contentList.size(), 1);
163 QCOMPARE(contentList[0]->content(), QStringLiteral("test text").toLocal8Bit()); 165 QCOMPARE(contentList[0]->content(), QStringLiteral("test text").toLocal8Bit());
164 QCOMPARE(contentList[0]->charset(), QStringLiteral("utf-8").toLocal8Bit()); 166 QCOMPARE(contentList[0]->charset(), QStringLiteral("utf-8").toLocal8Bit());
167 QCOMPARE(contentList[0]->encryptions().size(), 1);
168 QCOMPARE(contentList[0]->signatures().size(), 1);
165 auto contentAttachmentList = parser.collectAttachmentParts(); 169 auto contentAttachmentList = parser.collectAttachmentParts();
166 QCOMPARE(contentAttachmentList.size(), 2); 170 QCOMPARE(contentAttachmentList.size(), 2);
167 QCOMPARE(contentAttachmentList[0]->availableContents(), QVector<QByteArray>() << "text/plain"); 171 QCOMPARE(contentAttachmentList[0]->availableContents(), QVector<QByteArray>() << "text/plain");
168 QCOMPARE(contentAttachmentList[0]->content().size(), 1); 172 QCOMPARE(contentAttachmentList[0]->content().size(), 1);
173 QCOMPARE(contentAttachmentList[0]->encryptions().size(), 1);
174 QCOMPARE(contentAttachmentList[0]->signatures().size(), 1);
169 QCOMPARE(contentAttachmentList[1]->availableContents(), QVector<QByteArray>() << "image/png"); 175 QCOMPARE(contentAttachmentList[1]->availableContents(), QVector<QByteArray>() << "image/png");
170 QCOMPARE(contentAttachmentList[1]->content().size(), 1); 176 QCOMPARE(contentAttachmentList[1]->content().size(), 1);
177 QCOMPARE(contentAttachmentList[1]->encryptions().size(), 0);
178 QCOMPARE(contentAttachmentList[1]->signatures().size(), 0);
171 } 179 }
172 180
173 void testOpenPPGInline() 181 void testOpenPPGInline()
@@ -179,10 +187,14 @@ private slots:
179 auto contentPart = contentPartList[0]; 187 auto contentPart = contentPartList[0];
180 QVERIFY((bool)contentPart); 188 QVERIFY((bool)contentPart);
181 QCOMPARE(contentPart->availableContents(), QVector<QByteArray>() << "plaintext"); 189 QCOMPARE(contentPart->availableContents(), QVector<QByteArray>() << "plaintext");
190 QCOMPARE(contentPart->encryptions().size(), 0);
191 QCOMPARE(contentPart->signatures().size(), 0);
182 auto contentList = contentPart->content("plaintext"); 192 auto contentList = contentPart->content("plaintext");
183 QCOMPARE(contentList.size(), 1); 193 QCOMPARE(contentList.size(), 1);
184 QCOMPARE(contentList[0]->content(), QStringLiteral("asdasd asd asd asdf sadf sdaf sadf äöü").toLocal8Bit()); 194 QCOMPARE(contentList[0]->content(), QStringLiteral("asdasd asd asd asdf sadf sdaf sadf äöü").toLocal8Bit());
185 QCOMPARE(contentList[0]->charset(), QStringLiteral("utf-8").toLocal8Bit()); 195 QCOMPARE(contentList[0]->charset(), QStringLiteral("utf-8").toLocal8Bit());
196 QCOMPARE(contentList[0]->encryptions().size(), 1);
197 QCOMPARE(contentList[0]->signatures().size(), 1);
186 auto contentAttachmentList = parser.collectAttachmentParts(); 198 auto contentAttachmentList = parser.collectAttachmentParts();
187 QCOMPARE(contentAttachmentList.size(), 0); 199 QCOMPARE(contentAttachmentList.size(), 0);
188 } 200 }