Changeset View
Changeset View
Standalone View
Standalone View
messagecomposer/autotests/messagefactoryngtest.cpp
Show First 20 Lines • Show All 211 Lines • ▼ Show 20 Line(s) | 183 | { | |||
---|---|---|---|---|---|
212 | QString replyStr = QStringLiteral("> This is a mail for testing replyall and sender"); | 212 | QString replyStr = QStringLiteral("> This is a mail for testing replyall and sender"); | ||
213 | QCOMPARE(reply.msg->subject()->asUnicodeString(), QLatin1String("Re: Plain Message Test")); | 213 | QCOMPARE(reply.msg->subject()->asUnicodeString(), QLatin1String("Re: Plain Message Test")); | ||
214 | QCOMPARE_OR_DIFF(reply.msg->body(), replyStr.toLatin1()); | 214 | QCOMPARE_OR_DIFF(reply.msg->body(), replyStr.toLatin1()); | ||
215 | 215 | | |||
216 | QString dateStr = reply.msg->date()->asUnicodeString(); | 216 | QString dateStr = reply.msg->date()->asUnicodeString(); | ||
217 | QString ba = QString::fromLatin1("From: foo1 <identity1@bla.com>\n" | 217 | QString ba = QString::fromLatin1("From: foo1 <identity1@bla.com>\n" | ||
218 | "X-KMail-Identity: %1\n" | 218 | "X-KMail-Identity: %1\n" | ||
219 | "Date: %2\n" | 219 | "Date: %2\n" | ||
220 | "Cc: blo <blo@blo.org>, bli <bli@bli.org>, blu <blu@blu.org>, bly <bly@bly.org>, Bla <identity1@bla.com>\n" | 220 | "Cc: blu <blu@blu.org>, bly <bly@bly.org>\n" | ||
221 | "To: Bla <identity1@bla.com>\n" | 221 | "To: blo <blo@blo.org>, bli <bli@bli.org>\n" | ||
222 | "Subject: Re: Plain Message Test\n" | 222 | "Subject: Re: Plain Message Test\n" | ||
223 | "Content-Type: text/plain; charset=\"US-ASCII\"\n" | 223 | "Content-Type: text/plain; charset=\"US-ASCII\"\n" | ||
224 | "Content-Transfer-Encoding: 8Bit\nMIME-Version: 1.0\n" | 224 | "Content-Transfer-Encoding: 8Bit\nMIME-Version: 1.0\n" | ||
225 | "X-KMail-Link-Message: 0\n" | 225 | "X-KMail-Link-Message: 0\n" | ||
226 | "X-KMail-Link-Type: reply\n\n" | 226 | "X-KMail-Link-Type: reply\n\n" | ||
227 | "%3") | 227 | "%3") | ||
228 | .arg(i1.uoid()).arg(dateStr).arg(replyStr); | 228 | .arg(i1.uoid()).arg(dateStr).arg(replyStr); | ||
229 | QCOMPARE_OR_DIFF(reply.msg->encodedContent(), ba.toLatin1()); | 229 | QCOMPARE_OR_DIFF(reply.msg->encodedContent(), ba.toLatin1()); | ||
Show All 30 Lines | 233 | { | |||
260 | datetime += QLatin1Char(' ') + QLocale::system().toString(date.time(), QLocale::LongFormat); | 260 | datetime += QLatin1Char(' ') + QLocale::system().toString(date.time(), QLocale::LongFormat); | ||
261 | QString replyStr = QStringLiteral("> This is a mail for testing replyall and sender"); | 261 | QString replyStr = QStringLiteral("> This is a mail for testing replyall and sender"); | ||
262 | QCOMPARE(reply.msg->subject()->asUnicodeString(), QLatin1String("Re: Plain Message Test")); | 262 | QCOMPARE(reply.msg->subject()->asUnicodeString(), QLatin1String("Re: Plain Message Test")); | ||
263 | QCOMPARE_OR_DIFF(reply.msg->body(), replyStr.toLatin1()); | 263 | QCOMPARE_OR_DIFF(reply.msg->body(), replyStr.toLatin1()); | ||
264 | 264 | | |||
265 | QString dateStr = reply.msg->date()->asUnicodeString(); | 265 | QString dateStr = reply.msg->date()->asUnicodeString(); | ||
266 | QString ba = QString::fromLatin1("From: another <another@another.com>\n" | 266 | QString ba = QString::fromLatin1("From: another <another@another.com>\n" | ||
267 | "Date: %1\n" | 267 | "Date: %1\n" | ||
268 | "Cc: blo <blo@blo.org>, bli <bli@bli.org>, blu <blu@blu.org>, bly <bly@bly.org>\n" | 268 | "Cc: blu <blu@blu.org>, bly <bly@bly.org>\n" | ||
269 | "To: Bla <identity1@bla.com>\n" | 269 | "To: blo <blo@blo.org>, bli <bli@bli.org>\n" | ||
270 | "Subject: Re: Plain Message Test\n" | 270 | "Subject: Re: Plain Message Test\n" | ||
271 | "Content-Type: text/plain; charset=\"US-ASCII\"\n" | 271 | "Content-Type: text/plain; charset=\"US-ASCII\"\n" | ||
272 | "Content-Transfer-Encoding: 8Bit\nMIME-Version: 1.0\n" | 272 | "Content-Transfer-Encoding: 8Bit\nMIME-Version: 1.0\n" | ||
273 | "X-KMail-Link-Message: 0\n" | 273 | "X-KMail-Link-Message: 0\n" | ||
274 | "X-KMail-Link-Type: reply\n\n" | 274 | "X-KMail-Link-Type: reply\n\n" | ||
275 | "%2") | 275 | "%2") | ||
276 | .arg(dateStr).arg(replyStr); | 276 | .arg(dateStr).arg(replyStr); | ||
277 | QCOMPARE_OR_DIFF(reply.msg->encodedContent(), ba.toLatin1()); | 277 | QCOMPARE_OR_DIFF(reply.msg->encodedContent(), ba.toLatin1()); | ||
▲ Show 20 Lines • Show All 698 Lines • Show Last 20 Lines |