Changeset View
Changeset View
Standalone View
Standalone View
messagecomposer/autotests/messagefactoryngtest.cpp
Show First 20 Lines • Show All 201 Lines • ▼ Show 20 Line(s) | 176 | { | |||
---|---|---|---|---|---|
202 | QDateTime date = msg->date()->dateTime(); | 202 | QDateTime date = msg->date()->dateTime(); | ||
203 | QString datetime = QLocale::system().toString(date.date(), QLocale::LongFormat); | 203 | QString datetime = QLocale::system().toString(date.date(), QLocale::LongFormat); | ||
204 | datetime += QLatin1String(" ") + QLocale::system().toString(date.time(), QLocale::LongFormat); | 204 | datetime += QLatin1String(" ") + QLocale::system().toString(date.time(), QLocale::LongFormat); | ||
205 | QString replyStr = QStringLiteral("> This is a mail for testing replyall and sender"); | 205 | QString replyStr = QStringLiteral("> This is a mail for testing replyall and sender"); | ||
206 | QCOMPARE(reply.msg->subject()->asUnicodeString(), QLatin1String("Re: Plain Message Test")); | 206 | QCOMPARE(reply.msg->subject()->asUnicodeString(), QLatin1String("Re: Plain Message Test")); | ||
207 | QCOMPARE_OR_DIFF(reply.msg->body(), replyStr.toLatin1()); | 207 | QCOMPARE_OR_DIFF(reply.msg->body(), replyStr.toLatin1()); | ||
208 | 208 | | |||
209 | QString dateStr = reply.msg->date()->asUnicodeString(); | 209 | QString dateStr = reply.msg->date()->asUnicodeString(); | ||
210 | QString ba = QString::fromLatin1("From: another <another@another.com>\n" | 210 | QString ba = QString::fromLatin1("From: foo1 <identity1@bla.com>\n" | ||
211 | "Date: %1\n" | 211 | "X-KMail-Identity: %1\n" | ||
212 | "Date: %2\n" | ||||
212 | "Cc: blo <blo@blo.org>, bli <bli@bli.org>, blu <blu@blu.org>, bly <bly@bly.org>, Bla <identity1@bla.com>\n" | 213 | "Cc: blo <blo@blo.org>, bli <bli@bli.org>, blu <blu@blu.org>, bly <bly@bly.org>, Bla <identity1@bla.com>\n" | ||
213 | "To: Bla <identity1@bla.com>\n" | 214 | "To: Bla <identity1@bla.com>\n" | ||
214 | "Subject: Re: Plain Message Test\n" | 215 | "Subject: Re: Plain Message Test\n" | ||
215 | "Content-Type: text/plain; charset=\"US-ASCII\"\n" | 216 | "Content-Type: text/plain; charset=\"US-ASCII\"\n" | ||
216 | "Content-Transfer-Encoding: 8Bit\nMIME-Version: 1.0\n" | 217 | "Content-Transfer-Encoding: 8Bit\nMIME-Version: 1.0\n" | ||
217 | "X-KMail-Link-Message: 0\n" | 218 | "X-KMail-Link-Message: 0\n" | ||
218 | "X-KMail-Link-Type: reply\n\n" | 219 | "X-KMail-Link-Type: reply\n\n" | ||
219 | "%2") | 220 | "%3") | ||
220 | .arg(dateStr).arg(replyStr); | 221 | .arg(i1.uoid()).arg(dateStr).arg(replyStr); | ||
221 | QCOMPARE_OR_DIFF(reply.msg->encodedContent(), ba.toLatin1()); | 222 | QCOMPARE_OR_DIFF(reply.msg->encodedContent(), ba.toLatin1()); | ||
222 | } | 223 | } | ||
223 | 224 | | |||
224 | void MessageFactoryTest::testCreateReplyToAllWithUseSenderAsync() | 225 | void MessageFactoryTest::testCreateReplyToAllWithUseSenderAsync() | ||
225 | { | 226 | { | ||
226 | const QString filename(QStringLiteral(MAIL_DATA_DIR) + QStringLiteral("/replyall_with_identity_message.mbox")); | 227 | const QString filename(QStringLiteral(MAIL_DATA_DIR) + QStringLiteral("/replyall_with_identity_message.mbox")); | ||
227 | KMime::Message::Ptr msg = loadMessage(filename); | 228 | KMime::Message::Ptr msg = loadMessage(filename); | ||
228 | KIdentityManagement::Identity &i1 = mIdentMan->modifyIdentityForName(QStringLiteral("test1")); | 229 | KIdentityManagement::Identity &i1 = mIdentMan->modifyIdentityForName(QStringLiteral("test1")); | ||
▲ Show 20 Lines • Show All 761 Lines • Show Last 20 Lines |