Commit 455ddbc2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add more autotest

parent dd5d5145
......@@ -742,3 +742,21 @@ void StringUtilTest::test_parseMailToBug206269()
QCOMPARE(data.at(2).first, QLatin1String("body"));
QCOMPARE(data.at(2).second, QLatin1String("D&C"));
}
void StringUtilTest::test_splitAddressField()
{
{
const QByteArray ba(QByteArrayLiteral("foo@kde.org"));
const QVector<KMime::Types::Address> list = StringUtil::splitAddressField(ba);
QCOMPARE(list.count(), 1);
QCOMPARE(list.at(0).mailboxList.at(0).address(), QByteArrayLiteral("foo@kde.org"));
}
{
const QByteArray ba(QByteArrayLiteral("\"foo, bla\" <foo@kde.org>"));
const QVector<KMime::Types::Address> list = StringUtil::splitAddressField(ba);
QCOMPARE(list.count(), 1);
QCOMPARE(list.at(0).mailboxList.at(0).address(), QByteArrayLiteral("foo@kde.org"));
}
}
......@@ -34,5 +34,6 @@ private Q_SLOTS:
void test_crashXdgemail();
void test_xdgemail();
void test_parseMailToBug206269();
void test_splitAddressField();
};
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