Commit 14bb52d5 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Start to look at parsing vcard2.1

parent 72e2ed71
......@@ -183,6 +183,26 @@ void PhoneNumberTest::labelTest()
QLatin1String("Work Fax/Preferred"));
}
void PhoneNumberTest::shouldParseVCard21()
{
QByteArray vcarddata("BEGIN:VCARD\n"
"VERSION:2.1\n"
"EMAIL:foo@kde.org\n"
"N:;;;;\n"
"TEL;CELL;WORK:+1-919-676-9564\n"
"UID:testuid\n"
"END:VCARD\n"
"\n");
KContacts::VCardTool vcard;
const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata);
QCOMPARE(lst.count(), 1);
KContacts::Addressee addr = lst.at(0);
QCOMPARE(addr.phoneNumbers().count(), 1);
KContacts::PhoneNumber number1 = addr.phoneNumbers().at(0);
//QCOMPARE(number1.number(), QString());
}
void PhoneNumberTest::shouldExportVCard21()
{
KContacts::AddresseeList lst;
......
......@@ -42,6 +42,7 @@ private Q_SLOTS:
void shouldParseVcard4();
void shouldExportVCard21();
void shouldParseVCard21();
};
#endif
Supports Markdown
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