summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorniko <niko>2012-10-02 22:23:46 (GMT)
committerniko <niko>2012-10-02 22:23:46 (GMT)
commit32c1661206a070f04a15fc024464f91e932aac35 (patch)
tree4a98624de442447ef82aa523542b0981e9384197
parent7b47175cd7c82f806b37d2fe2332cc3b6b8e105b (diff)
downloadsynckolab-32c1661206a070f04a15fc024464f91e932aac35.tar.gz
more tests
-rw-r--r--src/chrome/content/synckolab/addressbookTools.js35
-rw-r--r--test/suite.js1
-rw-r--r--test/synckolab/parser/kolab2/json/testContactMinimalFromXML.json10
-rw-r--r--test/synckolab/parser/kolab2/json/testcontact.json41
-rw-r--r--test/synckolab/parser/kolab2/raw/testContactMinimalFromXML.xml (renamed from test/synckolab/parser/kolab3/raw/testContactMinimalFromXML.xml)0
-rw-r--r--test/synckolab/parser/kolab2/raw/testcontact.xml (renamed from test/synckolab/parser/kolab3/raw/testcontact.xml)3
-rw-r--r--test/synckolab/parser/kolab2/raw/testevent.xml (renamed from test/synckolab/parser/kolab3/raw/testevent.xml)0
-rw-r--r--test/synckolab/parser/kolab2/raw/testnote.xml (renamed from test/synckolab/parser/kolab3/raw/testnote.xml)0
-rw-r--r--test/synckolab/parser/kolab2/raw/xcalCalendar.xml (renamed from test/synckolab/parser/kolab3/raw/xcalCalendar.xml)0
-rw-r--r--test/synckolab/parser/kolab2/raw/xcalEvent.xml (renamed from test/synckolab/parser/kolab3/raw/xcalEvent.xml)0
-rw-r--r--test/synckolab/parser/kolab3/contactTest.js34
-rw-r--r--test/synckolab/parser/kolab3/raw/complex.vcf.mime264
-rw-r--r--test/synckolab/parser/kolab3/raw/simple.vcf.mime66
13 files changed, 446 insertions, 8 deletions
diff --git a/src/chrome/content/synckolab/addressbookTools.js b/src/chrome/content/synckolab/addressbookTools.js
index 6cdbaf7..db4a96c 100644
--- a/src/chrome/content/synckolab/addressbookTools.js
+++ b/src/chrome/content/synckolab/addressbookTools.js
@@ -761,9 +761,11 @@ synckolab.addressbookTools.xml2Card = function (xml, card) {
}
tok = cur.firstChild.data.split("-");
this.setCardProperty(card, "BirthYear", tok[0]);
- this.setCardProperty(card, "BirthMonth", tok[1]);
- // BDAY: 1987-09-27
- this.setCardProperty(card, "BirthDay", tok[2]);
+ if(tok.length > 2) {
+ this.setCardProperty(card, "BirthMonth", tok[1]);
+ // BDAY: 1987-09-27
+ this.setCardProperty(card, "BirthDay", tok[2]);
+ }
found = true;
break;
// anniversary - not in vcard rfc??
@@ -774,9 +776,11 @@ synckolab.addressbookTools.xml2Card = function (xml, card) {
tok = cur.getFirstData().split("-");
this.setCardProperty(card, "AnniversaryYear", tok[0]);
- this.setCardProperty(card, "AnniversaryMonth", tok[1]);
- // BDAY:1987-09-27T08:30:00-06:00
- this.setCardProperty(card, "AnniversaryDay", tok[2]);
+ if(tok.length > 2) {
+ this.setCardProperty(card, "AnniversaryMonth", tok[1]);
+ // BDAY:1987-09-27T08:30:00-06:00
+ this.setCardProperty(card, "AnniversaryDay", tok[2]);
+ }
found = true;
break;
/* @deprecated
@@ -909,6 +913,25 @@ synckolab.addressbookTools.xml2Card = function (xml, card) {
}
this.setCardProperty(card, "AllowRemoteContent", 'TRUE' === cur.firstChild.data.toUpperCase());
break;
+
+ // fields we "know" about but just cannot work with (used for kolab 3)
+ case "CREATION-DATE":
+ case "LATITUDE":
+ case "LONGITUDE":
+ case "ASSISTANT":
+ case "MANAGER-NAME":
+ case "PROFESSION":
+ case "SPOUSE-NAME":
+ case "CHILDREN":
+ case "GENDER":
+ case "LANGUAGE":
+ case "OFFICE-LOCATION":
+ case "FREE-BUSY-URL":
+ if (cur.firstChild === null) {
+ break;
+ }
+ this.setCardProperty(card, cur.nodeName, cur.getFirstData(), true);
+ break;
default:
if (cur.firstChild === null) {
break;
diff --git a/test/suite.js b/test/suite.js
index dc121d7..746d8d7 100644
--- a/test/suite.js
+++ b/test/suite.js
@@ -38,6 +38,7 @@ load("test/synckolab/tools/textTest.js");
load("test/synckolab/parser/kolab2/calendarTest.js");
load("test/synckolab/parser/kolab2/contactTest.js");
+//load("test/synckolab/parser/kolab3/contactTest.js");
print("========================")
print("Tests Run: " + (testRuns.fail+testRuns.pass));
diff --git a/test/synckolab/parser/kolab2/json/testContactMinimalFromXML.json b/test/synckolab/parser/kolab2/json/testContactMinimalFromXML.json
new file mode 100644
index 0000000..4452209
--- /dev/null
+++ b/test/synckolab/parser/kolab2/json/testContactMinimalFromXML.json
@@ -0,0 +1,10 @@
+{
+ "synckolab": "3.0.0",
+ "type": "contact",
+ "isMailList": false,
+ "ts": 1349213438284,
+ "UUID": "0123456789",
+ "creation-date": "2011-10-25T14:31:43.604435",
+ "PrimaryEmail": "vanmeeuwen@kolabsys.com",
+ "sha1": "bdcd8a895e2c8d7e32b1a56aa6a2d7aaa1dc5b9d"
+} \ No newline at end of file
diff --git a/test/synckolab/parser/kolab2/json/testcontact.json b/test/synckolab/parser/kolab2/json/testcontact.json
new file mode 100644
index 0000000..a94b85d
--- /dev/null
+++ b/test/synckolab/parser/kolab2/json/testcontact.json
@@ -0,0 +1,41 @@
+{
+ "synckolab": "3.0.0",
+ "type": "contact",
+ "isMailList": false,
+ "ts": 1349214053542,
+ "UUID": "uid",
+ "creation-date": "2004-05-04T15:00:00Z",
+ "FirstName": "(string, default empty)",
+ "LastName": "(string, default empty)",
+ "DisplayName": "(string, default empty)",
+ "free-busy-url": "(string, default empty)",
+ "Company": "(string, default empty)",
+ "WebPage1": "(string, default empty)",
+ "AimScreenName": "(string, default empty)",
+ "Department": "(string, default empty)",
+ "office-location": "(string, default empty)",
+ "profession": "(string, default empty)",
+ "JobTitle": "(string, default empty)",
+ "manager-name": "(string, default empty)",
+ "assistant": "(string, default empty)",
+ "NickName": "(string, default empty)",
+ "spouse-name": "(string, default empty)",
+ "BirthYear": "(date, no default)",
+ "AnniversaryYear": "(date, no default)",
+ "PhotoName": "(string(attachment filename), default empty)",
+ "children": "(string, default empty)",
+ "gender": "(string, default empty)",
+ "language": "(string, default empty)",
+ "CellularNumber": "(string, default empty)",
+ "PrimaryEmail": "(string, default empty)",
+ "HomeAddress": "(string, default empty)",
+ "HomeAddress2": "",
+ "HomeCity": "(string, default empty)",
+ "HomeState": "(string, default empty)",
+ "HomeZipCode": "(string, default empty)",
+ "HomeCountry": "(string, default empty)",
+ "preferred-address": "(string, default none)",
+ "latitude": "3.23",
+ "longitude": "5.222",
+ "sha1": "9bd2adac4fdeb9e44eb5c2f05d2a5458a9170703"
+} \ No newline at end of file
diff --git a/test/synckolab/parser/kolab3/raw/testContactMinimalFromXML.xml b/test/synckolab/parser/kolab2/raw/testContactMinimalFromXML.xml
index 7a316ff..7a316ff 100644
--- a/test/synckolab/parser/kolab3/raw/testContactMinimalFromXML.xml
+++ b/test/synckolab/parser/kolab2/raw/testContactMinimalFromXML.xml
diff --git a/test/synckolab/parser/kolab3/raw/testcontact.xml b/test/synckolab/parser/kolab2/raw/testcontact.xml
index 1db956b..95ca60c 100644
--- a/test/synckolab/parser/kolab3/raw/testcontact.xml
+++ b/test/synckolab/parser/kolab2/raw/testcontact.xml
@@ -39,7 +39,6 @@
<gender>(string, default empty)</gender>
<language>(string, default empty)</language>
<phone>
- <type>(string, no default)</type>
<number>(string, default empty)</number>
</phone>
<email>
@@ -47,7 +46,7 @@
<smtp-address>(string, default empty)</smtp-address>
</email>
<address>
- <type>(string, default home)</type>
+ <type>home</type>
<street>(string, default empty)</street>
<locality>(string, default empty)</locality>
<region>(string, default empty)</region>
diff --git a/test/synckolab/parser/kolab3/raw/testevent.xml b/test/synckolab/parser/kolab2/raw/testevent.xml
index 57aff69..57aff69 100644
--- a/test/synckolab/parser/kolab3/raw/testevent.xml
+++ b/test/synckolab/parser/kolab2/raw/testevent.xml
diff --git a/test/synckolab/parser/kolab3/raw/testnote.xml b/test/synckolab/parser/kolab2/raw/testnote.xml
index f7ad5b0..f7ad5b0 100644
--- a/test/synckolab/parser/kolab3/raw/testnote.xml
+++ b/test/synckolab/parser/kolab2/raw/testnote.xml
diff --git a/test/synckolab/parser/kolab3/raw/xcalCalendar.xml b/test/synckolab/parser/kolab2/raw/xcalCalendar.xml
index 0ae17ef..0ae17ef 100644
--- a/test/synckolab/parser/kolab3/raw/xcalCalendar.xml
+++ b/test/synckolab/parser/kolab2/raw/xcalCalendar.xml
diff --git a/test/synckolab/parser/kolab3/raw/xcalEvent.xml b/test/synckolab/parser/kolab2/raw/xcalEvent.xml
index 16c78c6..16c78c6 100644
--- a/test/synckolab/parser/kolab3/raw/xcalEvent.xml
+++ b/test/synckolab/parser/kolab2/raw/xcalEvent.xml
diff --git a/test/synckolab/parser/kolab3/contactTest.js b/test/synckolab/parser/kolab3/contactTest.js
new file mode 100644
index 0000000..3e067ca
--- /dev/null
+++ b/test/synckolab/parser/kolab3/contactTest.js
@@ -0,0 +1,34 @@
+// load synckolab libraries
+
+load("src/chrome/content/synckolab/tools.js");
+load("src/chrome/content/synckolab/tools/sha1.js");
+load("src/chrome/content/synckolab/tools/kolab.js");
+load("src/chrome/content/synckolab/tools/text.js");
+
+load("src/chrome/content/synckolab/addressbookTools.js");
+
+load("test/lib/testOverride.js");
+
+
+test("synckolab.addressbookTools.parseMessageContent", function(){
+ equal(null, synckolab.addressbookTools.parseMessageContent(null), "parsing a null message");
+});
+
+ var testFiles = ["testcontact", "testContactMinimalFromXML"];
+
+
+ var content, entry, jsonEntry;
+
+ for(var i = 0; i < testFiles.length; i++) {
+ var src = testFiles[i];
+
+ content = readFile("test/synckolab/parser/kolab3/raw/"+src+".xml");
+ entry = synckolab.addressbookTools.parseMessageContent(content);
+ print(JSON.stringify(entry, null, ' '))
+ content = readFile("test/synckolab/parser/kolab3/json/"+src+".json");
+ jsonEntry = JSON.parse(content);
+ equal(synckolab.tools.equalsObject(entry, jsonEntry), true, src);
+ }
+
+
+
diff --git a/test/synckolab/parser/kolab3/raw/complex.vcf.mime b/test/synckolab/parser/kolab3/raw/complex.vcf.mime
new file mode 100644
index 0000000..54fa347
--- /dev/null
+++ b/test/synckolab/parser/kolab3/raw/complex.vcf.mime
@@ -0,0 +1,264 @@
+Date: Fri, 27 Apr 2012 02:25:38 +0200
+X-Kolab-Type: application/x-vnd.kolab.contact
+X-Kolab-Mime-Version: 3.0
+User-Agent: Libkolab-0.2.0
+Content-Type: multipart/mixed; boundary="nextPart38186565.1WqI9LYOEs"
+Subject: Huu5X7hfYy
+From: Displayname <first@email.org>
+MIME-Version: 1.0
+
+
+--nextPart38186565.1WqI9LYOEs
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7Bit
+
+This is a Kolab Groupware object.
+To view this object you will need an email client that can understand the Kolab Groupware format.
+For a list of such email clients please visit
+http://www.kolab.org/get-kolab
+
+--nextPart38186565.1WqI9LYOEs
+Content-Type: application/vcard+xml; name="kolab.xml"
+Content-Transfer-Encoding: quoted-printable
+Content-Disposition: attachment; filename="kolab.xml"
+
+<?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"no" ?>
+<vcards xmlns=3D"urn:ietf:params:xml:ns:vcard-4.0">
+
+ <vcard>
+ <uid>
+ <uri>urn:uuid:Huu5X7hfYy</uri>
+ </uid>
+ <x-kolab-version>
+ <text>3.0dev1</text>
+ </x-kolab-version>
+ <prodid>
+ <text>Libkolab-0.2.0 Libkolabxml-0.4.0</text>
+ </prodid>
+ <rev>
+ <timestamp>20120505T050505Z</timestamp>
+ </rev>
+ <kind>
+ <text>individual</text>
+ </kind>
+ <fn>
+ <text>Displayname</text>
+ </fn>
+ <n>
+ <surname>Lastname</surname>
+ <given>Firstname</given>
+ <additional/>
+ <prefix/>
+ <suffix/>
+ </n>
+ <note>
+ <text>Notes</text>
+ </note>
+ <title>
+ <text>Title</text>
+ </title>
+ <group name=3D"Affiliation">
+ <org>
+ <text>Organization</text>
+ <text>Department</text>
+ </org>
+ <logo>
+ <uri>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYA=
+AABw4pVUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOTQAADpwB3vacVwAABBlJREFUeJz=
+tnc1rY1UYxt+bmzTpB2O/sNO0dtoMRdKCgkWmOLjpH6CuHCiCGykudD0MDEKZhQjqVtQKIl=
+27cKULF7pwaOvAKAgzgi2S2lSsdCYfnaTtzXVfnvfaDJg+xee3fE5P3kN+OXB6cu6JmRBCC=
+CGEEEIIIYQQQjwGgZmNOG1PdXIg/0N2UJjq9ChEMhJChoSQISFkSAgZaTMbRw1xHK8l9JPI=
+09NCYSaTeRHlemPJkBAyJIQMCSFDQshIJ7S5slZWPoN5sViE+aVLk+2M6V8InDiEcbj9jvt=
+KYRDB/HBsGXeIndoWuzXy+VH4PqbT+K3XDCFDQsiQEDIkhAwJIcNdZUUR3IIxM7OFhQWY5/=
+N5mJfLuzCPY3914uKsplIPv4H5hT48JjOzVHYM5seV72DeyF6FeRzj1ZqZWRT5bXBMbf21+=
+M+REDIkhAwJIUNCyJAQMtxlb61Wczs1m4cwX11dhflUoQDz0dGks3jORt7RnzAebnwL88zF=
+190K3qq7Zw+/VsVmYR7F3W6NWv2R24bQDCFDQsiQEDIkhAwJIcNdZVUqFbdTs9mE+ZX5F2A=
++MQBP3tv+75+4NbpzeJWVy+IhZydfgXkYb7k1wuNtXHvwCZhnDr6CebXR69Y4LPfD/M1Xx+=
+Gup2YIGRJChoSQISFkSAgZCV/hHrmd1tZuw3xm9hmY57bfh3lhbtGtkQrw177B8T7u0Prey=
+etuDW+7zGL8Oc32TsA86p10S4RhDuZvX+u/gXLNEDIkhAwJIUNCyJAQMgIzm0MNW1ubP3qd=
+Ws4ZupGLozD/5S5eAY0ffeAOLF+87BT/C+extypM+szhtlbqSZjXo2ed1+lyKzza+QHm732=
+4+trpRyTODAkhQ0LIkBAyJIQMCSHDXfaWSqV1r1O1Wm9TJH6mo1W/5/YYi96Fef9UFXfwTr=
+0F/iE2CwbwuAJ8gK/ewpunjdKGW+JB+BL8J2Hm+UXddXIekBAyJIQMCSFDQsgIzGzKaXu6k=
+wM5yZ3PB2+i/LmXh/CjsC3/8Qkf7ylgvCqMA/xYxfqXP+MdRDObf+PhLafpNxRqhpAhIWRI=
+CBkSQoaEkJE2M++8vn+OvwNMTw9fhw3ZPdyh5e1lJVVxGp3XClK/wrwwFv6dUOTrpBGcRDO=
+EDAkhQ0LIkBAyJISMpHt7z5QwF+Or4LrwDW3NMt5/2rvv3ANiZmFXGn4gh6bxpbqZEXxNRp=
+CJhr0a7aIZQoaEkCEhZEgIGRJChoSQQbvsrZb/gA987Jb6fkL5fiX6FOV3y7kvvBoDqTQ8R=
+TezY2+hvK8/WEJ52Ki3d1tyApohZEgIGRJChoSQISFk0K6yPto4gGf/l5cP/N/RaB/n2QaD=
+vyT28dIcPvQ2sNnjl9C9vecaCSFDQsiQEDIkhIx/AF4jzh2wCYImAAAAAElFTkSuQmCC</u=
+ri>
+ </logo>
+ <related>
+ <parameters>
+ <type>
+ <text>x-manager</text>
+ </type>
+ </parameters>
+ <text>Manager</text>
+ </related>
+ <related>
+ <parameters>
+ <type>
+ <text>x-assistant</text>
+ </type>
+ </parameters>
+ <text>Assistant</text>
+ </related>
+ <adr>
+ <parameters>
+ <type>
+ <text>work</text>
+ </type>
+ <label>
+ <text>Office</text>
+ </label>
+ </parameters>
+ <pobox/>
+ <ext/>
+ <street/>
+ <locality/>
+ <region/>
+ <code/>
+ <country/>
+ </adr>
+ </group>
+ <url>
+ <uri>www.homepage.org</uri>
+ </url>
+ <url>
+ <parameters>
+ <type>
+ <text>x-blog</text>
+ </type>
+ </parameters>
+ <uri>www.blog.test</uri>
+ </url>
+ <adr>
+ <parameters>
+ <type>
+ <text>home</text>
+ </type>
+ </parameters>
+ <pobox/>
+ <ext/>
+ <street>Home Street</street>
+ <locality>Home Locality</locality>
+ <region>Home Region</region>
+ <code>Home Postal Code</code>
+ <country>Gabon</country>
+ </adr>
+ <adr>
+ <parameters>
+ <type>
+ <text>work</text>
+ </type>
+ </parameters>
+ <pobox/>
+ <ext/>
+ <street>Work Street</street>
+ <locality>Work Locality</locality>
+ <region>Work Region</region>
+ <code>Work Postal Code</code>
+ <country>Azerbaijan</country>
+ </adr>
+ <nickname>
+ <text>Nickname</text>
+ </nickname>
+ <related>
+ <parameters>
+ <type>
+ <text>spouse</text>
+ </type>
+ </parameters>
+ <text>Partner</text>
+ </related>
+ <bday>
+ <date-time>20090727T000000</date-time>
+ </bday>
+ <anniversary>
+ <date>20090728</date>
+ </anniversary>
+ <photo>
+ <uri>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAA=
+Bw4pVUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOTQAADpwB3vacVwAABAVJREFUeJztn=
+cFrFGcYxt/szLrJmk2yWTeojQktQluiqNFeKglSQmsOHhRyUApKPbeHQC8taKl4E0Hw4sGT=
+oAcvgojVQCg0B+2ph0DprTlYs7SQsNlkdzKzmf4DzxvYsCRP9Pkdn5n53iG/fPDy7TczZkI=
+IIYQQov107PQNtI0vrR/mOfveveap/eAcSXeqRsYdSOwIEkKGhJAhIWRICBkSQsbua3u/sl=
+EUj346OoPyUrGEW1Uzm5mfycMDNRtB8ciHIy9RXswXi16NuYU5XOOx1VGsGUKGhJAhIWRIC=
+BkSQka40zfgcs6uoHjis4l7KB8fG8+ifPa3Wb9GZJdRPHZq7A7KTx45CWu8/uO1X6NFNEPI=
+kBAyJIQMCSFDQsjYni4rxWtmnVOdsGMyM5s8PfkNyocPDwcor1QrcJwoiNzbOvvF2bsoL5f=
+KsMZidRGOU7OaW6NVNEPIkBAyJIQMCSFDQshob5flbCTr/br3BcrPjJ854Q2V78/DTudt9S=
+08P7YY5uXhslfC4jjGNdZwjaSewHwtXHNrtIpmCBkSQoaEkCEhZEgIGRJCxtba3vN4s1q5N=
+ADb2+MfHYMbyRqZBmw7zcxqq3jBLg5xe5tkcEu6buteCUsSfE0cOzUifH4jbLg1WkUzhAwJ=
+IUNCyJAQMiSEDL/LumQXvENDhaFHKB/sG4QbyZaiJfgTblLDXYuZWZzHnc56irum9SzOkw6=
+/RtOaOE9xnjTxWJmwff/XmiFkSAgZEkKGhJAhIWT4XVYQuOtMS7Vl+J6ON3+/gedv7NvAA5=
+X8G0uL+HUj5j1eCfu7TfLNjjmlzdlz19XEz3VuBc0QMiSEDAkhQ0LIkBAy/C7rQfOxd2jl6=
+toCygufFJ6jPGlEPSiv5+p+/b1OXnByr/varAHyuinv6QLn/CByG9KW0QwhQ0LIkBAyJIQM=
+CSFDQsjY2ka5+8nvKF6ZXv4Y5YWBnl9R3pfthOebmS1nl/C9dToXOO1wrj/nlbAocVYLvXZ=
+4FcdBs32P2WiGkCEhZEgIGRJChoSQ0d6ncG/bfyheSatHUd71c/dDb6gDuQ+mUL6Y/gNX8t=
+IUt0Z9/7qv7bVKXME74jIbeLXQ+SU6zKjLemeREDIkhAwJIUNCyNieN8p14NWhutUuepdEP=
+zVeofxQbugWyivVRa/78r8A8Zf9CPOBzA0U70lC+PcK0qBtX5nQDCFDQsiQEDIkhAwJIWP3=
+fYPqevg5ig8ePPALynu7e72tdfbnk3m8je54eArF+8v7n6G8mOnza7xwaugbVLsDCSFDQsi=
+QEDIkhAwJIWP3tb0eNw2+MTnoyl7zLmlOx985h/DvwV6Nnk1qfNtaDc0QMiSEDAkhQ0LIkB=
+AhhBBCCPEe8D+b5dDLeP4TXAAAAABJRU5ErkJggg=3D=3D</uri>
+ </photo>
+ <tel>
+ <parameters>
+ <type>
+ <text>home</text>
+ </type>
+ </parameters>
+ <text>+4930-homephone</text>
+ </tel>
+ <tel>
+ <parameters>
+ <type>
+ <text>cell</text>
+ </type>
+ </parameters>
+ <text>+4930-mobile</text>
+ </tel>
+ <tel>
+ <parameters>
+ <type>
+ <text>work</text>
+ </type>
+ </parameters>
+ <text>+4930-workphone</text>
+ </tel>
+ <tel>
+ <parameters>
+ <type>
+ <text>fax</text>
+ <text>work</text>
+ </type>
+ </parameters>
+ <text>+4930-fax</text>
+ </tel>
+ <impp>
+ <parameters>
+ <pref>
+ <integer>1</integer>
+ </pref>
+ </parameters>
+ <uri>messaging</uri>
+ </impp>
+ <email>
+ <parameters>
+ <pref>
+ <integer>1</integer>
+ </pref>
+ </parameters>
+ <text>first@email.org</text>
+ </email>
+ <email>
+ <text>second@email.org</text>
+ </email>
+ <x-custom>
+ <identifier>X-Profession</identifier>
+ <value>Profession</value>
+ </x-custom>
+ </vcard>
+
+</vcards>
+
+--nextPart38186565.1WqI9LYOEs--
diff --git a/test/synckolab/parser/kolab3/raw/simple.vcf.mime b/test/synckolab/parser/kolab3/raw/simple.vcf.mime
new file mode 100644
index 0000000..a459896
--- /dev/null
+++ b/test/synckolab/parser/kolab3/raw/simple.vcf.mime
@@ -0,0 +1,66 @@
+Date: Mon, 23 Apr 2012 12:46:37 +0200
+X-Kolab-Type: application/x-vnd.kolab.contact
+X-Kolab-Mime-Version: 3.0
+User-Agent: Libkolab-0.1.0
+Content-Type: multipart/mixed; boundary="nextPart1365947.WmFcbPlLFA"
+Subject: 4xuyC0cyjV
+From: Volker Krause <vkrause@kde.org>
+MIME-Version: 1.0
+
+
+--nextPart1365947.WmFcbPlLFA
+Content-Type: text/plain; charset="us-ascii"
+Content-Transfer-Encoding: 7Bit
+
+This is a Kolab Groupware object.
+To view this object you will need an email client that can understand the Kolab Groupware format.
+For a list of such email clients please visit
+http://www.kolab.org/get-kolab
+
+--nextPart1365947.WmFcbPlLFA
+Content-Type: application/vcard+xml; name="kolab.xml"
+Content-Transfer-Encoding: quoted-printable
+Content-Disposition: attachment; filename="kolab.xml"
+
+<?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"no" ?>
+<vcards xmlns=3D"urn:ietf:params:xml:ns:vcard-4.0">
+
+ <vcard>
+ <uid>
+ <uri>urn:uuid:4xuyC0cyjV</uri>
+ </uid>
+ <x-kolab-version>
+ <text>3.0dev1</text>
+ </x-kolab-version>
+ <prodid>
+ <text>Libkolab-0.1.0 Libkolabxml-0.3.0</text>
+ </prodid>
+ <rev>
+ <timestamp>20120505T050505Z</timestamp>
+ </rev>
+ <kind>
+ <text>individual</text>
+ </kind>
+ <fn>
+ <text>Volker Krause</text>
+ </fn>
+ <n>
+ <surname>Krause</surname>
+ <given>Volker</given>
+ <additional/>
+ <prefix/>
+ <suffix/>
+ </n>
+ <email>
+ <parameters>
+ <pref>
+ <integer>1</integer>
+ </pref>
+ </parameters>
+ <text>vkrause@kde.org</text>
+ </email>
+ </vcard>
+
+</vcards>
+
+--nextPart1365947.WmFcbPlLFA-- \ No newline at end of file