summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/chrome/content/synckolab/calendarTools.js22
-rw-r--r--test/synckolab/parser/kolab2/calendarTest.js76
-rw-r--r--test/synckolab/parser/kolab2/json/task-alarm.json22
-rw-r--r--test/synckolab/parser/kolab2/json/task-due.json14
-rw-r--r--test/synckolab/parser/kolab2/json/task-progress.json11
-rw-r--r--test/synckolab/parser/kolab2/json/task-recurr.json23
-rw-r--r--test/synckolab/parser/kolab2/raw/task-alarm.eml43
-rw-r--r--test/synckolab/parser/kolab2/raw/task-due.eml41
-rw-r--r--test/synckolab/parser/kolab2/raw/task-progress.eml42
-rw-r--r--test/synckolab/parser/kolab2/raw/task-recurr.eml46
-rw-r--r--test/synckolab/parser/kolab2/xml/task-alarm.xml14
-rw-r--r--test/synckolab/parser/kolab2/xml/task-due.xml13
-rw-r--r--test/synckolab/parser/kolab2/xml/task-progress.xml13
-rw-r--r--test/synckolab/parser/kolab2/xml/task-recurr.xml20
-rw-r--r--test/synckolab/parser/kolab3/contactTest.js2
-rw-r--r--test/synckolab/parser/kolab3/raw/contact.test2.mime1
-rw-r--r--test/synckolab/parser/kolab3/raw/list.test1.eml5
17 files changed, 404 insertions, 4 deletions
diff --git a/src/chrome/content/synckolab/calendarTools.js b/src/chrome/content/synckolab/calendarTools.js
index 409b3c2..0a3f95d 100644
--- a/src/chrome/content/synckolab/calendarTools.js
+++ b/src/chrome/content/synckolab/calendarTools.js
@@ -1655,11 +1655,23 @@ synckolab.calendarTools.xml2json = function (xml, syncTasks)
}
}
break;
+
+ // update revision
+ case "REVISION":
+ jobj.revision = Number(cur.getFirstData());
+ if(isNaN(jobj.revision)) {
+ jobj.revision = 0;
+ }
+ break;
// some nodes we cannot work with
case "SEQUENCE": // kolab3: integer
case "TRANSP": // text: TRANSPARENT
break;
+
+ // some nodes we REALLY can ignore
+ case "PRODUCT-ID":
+ break;
default:
synckolab.tools.logMessage("FIELD not found: '" + cur.nodeName + "' firstData='" + cur.getFirstData()+"'", synckolab.global.LOG_WARNING + synckolab.global.LOG_CAL);
@@ -1787,13 +1799,19 @@ synckolab.calendarTools.json2xml = function (jobj, syncTasks, email) {
xml += " <product-id>Synckolab " + synckolab.config.version + ", Calendar Sync</product-id>\n";
xml += synckolab.tools.text.nodeWithContent("uid", jobj.uid, false);
+ xml += synckolab.tools.text.nodeWithContent("revision", jobj.revision, false);
+
if(syncTasks === true)
{
// tasks have a status
xml += synckolab.tools.text.nodeWithContent("status", jobj.status, false);
xml += synckolab.tools.text.nodeWithContent("completed", jobj.completed, false);
- xml += synckolab.tools.text.nodeWithContent("start-date", jobj.startDate.dateTime, false);
- xml += synckolab.tools.text.nodeWithContent("due-date", jobj.endDate.dateTime, false);
+ if(jobj.startDate) {
+ xml += synckolab.tools.text.nodeWithContent("start-date", jobj.startDate.dateTime, false);
+ }
+ if(jobj.endDate) {
+ xml += synckolab.tools.text.nodeWithContent("due-date", jobj.endDate.dateTime, false);
+ }
xml += synckolab.tools.text.nodeWithContent("priority", jobj.priority, false);
// xml += " <completed-date>" + synckolab.tools.text.calDateTime2String(completedDate, true) + "</completed-date>\n";
diff --git a/test/synckolab/parser/kolab2/calendarTest.js b/test/synckolab/parser/kolab2/calendarTest.js
index e69de29..c4fcffc 100644
--- a/test/synckolab/parser/kolab2/calendarTest.js
+++ b/test/synckolab/parser/kolab2/calendarTest.js
@@ -0,0 +1,76 @@
+// 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/calendarTools.js");
+
+load("test/lib/testOverride.js");
+
+
+test("kolab3 synckolab.addressbookTools.parseMessageContent", function(){
+ equal(null, synckolab.calendarTools.message2json(null), "parsing a null message");
+ var testFiles = [{name:"task-alarm",task:true},{name:"task-due",task:true},{name:"task-progress",task:true},{name:"task-recurr",task:true}
+ ];
+
+ var content, entry, jsonEntry;
+
+ for(var i = 0; i < testFiles.length; i++) {
+ var src = testFiles[i];
+ print("INFO: KOLAB 2 TESTING - EVENT: " + src.name +"\n");
+
+ content = readFile("test/synckolab/parser/kolab2/raw/"+src.name + ".eml");
+
+ content = synckolab.tools.parseMail(content);
+ entry = synckolab.calendarTools.message2json(content, src.task);
+ content = readFile("test/synckolab/parser/kolab2/json/"+src.name+".json");
+ jsonEntry = JSON.parse(content);
+ equal(synckolab.tools.equalsObject(entry, jsonEntry), true, "Json compare: " + src.name);
+
+ // json -> kolab 2 xml
+ content = synckolab.calendarTools.json2xml(entry, src.task);
+ // if multipart
+ if(content.content) {
+ content = content.content;
+ }
+
+ xmlcontent = readFile("test/synckolab/parser/kolab2/xml/"+src.name + ".xml");
+ if (xmlcontent.replace(/[\n\r\t ]/g, "").length !== content.replace(/[\n\r\t ]/g, "").length) {
+ equal(xmlcontent.replace(/[\n\r\t ]/g, ""), content.replace(/[\n\r\t ]/g, ""), "XML differs" + src.name);
+ var diff = diffString(xmlcontent, content);
+ print("ERROR: DIFF FOUND:"+ xmlcontent.replace(/[\n\r\t ]/g, "").length + " vs. "+ content.replace(/[\n\r\t ]/g, "").length +"\n" + diff);
+ } else {
+ ok(src.name);
+ }
+
+ }
+});
+
+/*
+ var testFiles = [{name:"task-alarm", task:true}];
+
+
+ var content, entry, jsonEntry;
+
+ for(var i = 0; i < testFiles.length; i++) {
+ var src = testFiles[i];
+
+ content = readFile("test/synckolab/parser/kolab2/raw/"+src.name + ".eml");
+ content = synckolab.tools.parseMail(content);
+ print(content);
+ print("==== STARTING PARSE")
+ entry = synckolab.calendarTools.message2json(content, src.task);
+ print("json entry: " + JSON.stringify(entry, null, ' '))
+ // json -> kolab 2 xml
+ content = synckolab.calendarTools.json2xml(entry, src.task);
+ print(content);
+
+ content = readFile("test/synckolab/parser/kolab2/json/"+src.name+".json");
+ jsonEntry = JSON.parse(content);
+// equal(synckolab.tools.equalsObject(entry, jsonEntry), true, src);
+ }
+*/
+
+
diff --git a/test/synckolab/parser/kolab2/json/task-alarm.json b/test/synckolab/parser/kolab2/json/task-alarm.json
new file mode 100644
index 0000000..f2e61a1
--- /dev/null
+++ b/test/synckolab/parser/kolab2/json/task-alarm.json
@@ -0,0 +1,22 @@
+{
+ "synckolab": "2.9.0",
+ "type": "task",
+ "completed": 0,
+ "uid": "a92bef47-9337-42f9-9df3-e42e6f4b34c2",
+ "status": "not-started",
+ "startDate": {
+ "tz": null,
+ "dateTime": "2012-05-21T21:00:00Z"
+ },
+ "title": "aufgabe with alarm",
+ "sensitivity": "public",
+ "showTimeAs": "busy",
+ "alarms": [
+ {
+ "related": 1,
+ "offset": 120,
+ "description": "Mozilla Standardbeschreibung",
+ "action": "DISPLAY"
+ }
+ ]
+} \ No newline at end of file
diff --git a/test/synckolab/parser/kolab2/json/task-due.json b/test/synckolab/parser/kolab2/json/task-due.json
new file mode 100644
index 0000000..897e38a
--- /dev/null
+++ b/test/synckolab/parser/kolab2/json/task-due.json
@@ -0,0 +1,14 @@
+{
+ "synckolab": "2.9.0",
+ "type": "task",
+ "completed": 0,
+ "uid": "d8939a36-63cf-4a19-b854-badbaacff8a1",
+ "status": "not-started",
+ "endDate": {
+ "tz": null,
+ "dateTime": "2012-05-18T21:00:00Z"
+ },
+ "title": "Neue Aufgabe mit due",
+ "sensitivity": "public",
+ "showTimeAs": "busy"
+} \ No newline at end of file
diff --git a/test/synckolab/parser/kolab2/json/task-progress.json b/test/synckolab/parser/kolab2/json/task-progress.json
new file mode 100644
index 0000000..cfb757c
--- /dev/null
+++ b/test/synckolab/parser/kolab2/json/task-progress.json
@@ -0,0 +1,11 @@
+{
+ "synckolab": "2.9.0",
+ "type": "task",
+ "completed": 20,
+ "uid": "d60bb769-2e63-47df-b80a-565aee273881",
+ "status": "in-progress",
+ "title": "Neue Aufgabe in progress",
+ "sensitivity": "public",
+ "location": "test",
+ "showTimeAs": "busy"
+} \ No newline at end of file
diff --git a/test/synckolab/parser/kolab2/json/task-recurr.json b/test/synckolab/parser/kolab2/json/task-recurr.json
new file mode 100644
index 0000000..0b1e463
--- /dev/null
+++ b/test/synckolab/parser/kolab2/json/task-recurr.json
@@ -0,0 +1,23 @@
+{
+ "synckolab": "2.9.0",
+ "type": "task",
+ "completed": 0,
+ "uid": "2009024d-3db1-402c-8535-4ce560d0fb84",
+ "status": "not-started",
+ "startDate": {
+ "tz": null,
+ "dateTime": "2012-05-23T21:00:00Z"
+ },
+ "title": "Neue Aufgabe mit recurr",
+ "body": "test",
+ "sensitivity": "public",
+ "showTimeAs": "busy",
+ "recurrence": {
+ "cycle": "monthly",
+ "daynumber": -1,
+ "weekday": "sunday",
+ "interval": 1,
+ "count": 0,
+ "exclusion": []
+ }
+} \ No newline at end of file
diff --git a/test/synckolab/parser/kolab2/raw/task-alarm.eml b/test/synckolab/parser/kolab2/raw/task-alarm.eml
new file mode 100644
index 0000000..8734eb3
--- /dev/null
+++ b/test/synckolab/parser/kolab2/raw/task-alarm.eml
@@ -0,0 +1,43 @@
+From: niko.berger@corinis.com
+Reply-To:
+Bcc:
+To: synckolab@no.tld
+Subject: a92bef47-9337-42f9-9df3-e42e6f4b34c2
+Date: Mon, 21 May 2012 23:12:38 +0200
+Content-Type: Multipart/Mixed;boundary="Boundary-00=ACC92FED21BE628A"
+User-Agent: SyncKolab 2.0.0
+X-Kolab-Type: application/x-vnd.kolab.task
+
+--Boundary-00=ACC92FED21BE628A
+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/kolab2-clients.html
+---
+Summary: aufgabe with alarm
+Start date: 2012-05-21T21:00:00Z
+---
+
+Notice:
+The information above is only valid, if no other client than synckolab updated this message. (ie. a client that updates the attachment but not the message)
+
+--Boundary-00=ACC92FED21BE628A
+Content-Type: application/x-vnd.kolab.task;
+ name="kolab.xml"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment;
+ filename="kolab.xml"
+
+PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHRhc2sgdmVyc2lvbj0iMS4wIiA+
+CiA8cHJvZHVjdC1pZD5TeW5ja29sYWIgMi4wLjAsIENhbGVuZGFyIFN5bmM8L3Byb2R1Y3QtaWQ+CiAg
+PHVpZD5hOTJiZWY0Ny05MzM3LTQyZjktOWRmMy1lNDJlNmY0YjM0YzI8L3VpZD4KICA8c3RhdHVzPm5v
+dC1zdGFydGVkPC9zdGF0dXM+CiAgPHN0YXJ0LWRhdGU+MjAxMi0wNS0yMVQyMTowMDowMFo8L3N0YXJ0
+LWRhdGU+CiAgPHN1bW1hcnk+YXVmZ2FiZSB3aXRoIGFsYXJtPC9zdW1tYXJ5PgogIDxzZW5zaXRpdml0
+eT5wdWJsaWM8L3NlbnNpdGl2aXR5PgogIDxzaG93LXRpbWUtYXM+YnVzeTwvc2hvdy10aW1lLWFzPgog
+PGFsYXJtIGRlc2NyaXB0aW9uPSJNb3ppbGxhIFN0YW5kYXJkYmVzY2hyZWlidW5nIiBhY3Rpb249IkRJ
+U1BMQVkiPjEyMDwvYWxhcm0+CiA8cmV2aXNpb24+MDwvcmV2aXNpb24+CjwvdGFzaz4K
+--Boundary-00=ACC92FED21BE628A--
diff --git a/test/synckolab/parser/kolab2/raw/task-due.eml b/test/synckolab/parser/kolab2/raw/task-due.eml
new file mode 100644
index 0000000..f286c07
--- /dev/null
+++ b/test/synckolab/parser/kolab2/raw/task-due.eml
@@ -0,0 +1,41 @@
+From: niko.berger@corinis.com
+Reply-To:
+Bcc:
+To: synckolab@no.tld
+Subject: d8939a36-63cf-4a19-b854-badbaacff8a1
+Date: Fri, 18 May 2012 23:25:26 +0200
+Content-Type: Multipart/Mixed;boundary="Boundary-00=B9E87B1AFD091F1F"
+User-Agent: SyncKolab 2.0.0
+X-Kolab-Type: application/x-vnd.kolab.task
+
+--Boundary-00=B9E87B1AFD091F1F
+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/kolab2-clients.html
+---
+Summary: Neue Aufgabe mit due
+---
+
+Notice:
+The information above is only valid, if no other client than synckolab updated this message. (ie. a client that updates the attachment but not the message)
+
+--Boundary-00=B9E87B1AFD091F1F
+Content-Type: application/x-vnd.kolab.task;
+ name="kolab.xml"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment;
+ filename="kolab.xml"
+
+PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHRhc2sgdmVyc2lvbj0iMS4wIiA+
+CiA8cHJvZHVjdC1pZD5TeW5ja29sYWIgMi4wLjAsIENhbGVuZGFyIFN5bmM8L3Byb2R1Y3QtaWQ+CiAg
+PHVpZD5kODkzOWEzNi02M2NmLTRhMTktYjg1NC1iYWRiYWFjZmY4YTE8L3VpZD4KICA8c3RhdHVzPm5v
+dC1zdGFydGVkPC9zdGF0dXM+CiAgPGR1ZS1kYXRlPjIwMTItMDUtMThUMjE6MDA6MDBaPC9kdWUtZGF0
+ZT4KICA8c3VtbWFyeT5OZXVlIEF1ZmdhYmUgbWl0IGR1ZTwvc3VtbWFyeT4KICA8c2Vuc2l0aXZpdHk+
+cHVibGljPC9zZW5zaXRpdml0eT4KICA8c2hvdy10aW1lLWFzPmJ1c3k8L3Nob3ctdGltZS1hcz4KIDxy
+ZXZpc2lvbj4wPC9yZXZpc2lvbj4KPC90YXNrPgo=
+--Boundary-00=B9E87B1AFD091F1F--
diff --git a/test/synckolab/parser/kolab2/raw/task-progress.eml b/test/synckolab/parser/kolab2/raw/task-progress.eml
new file mode 100644
index 0000000..3d7194b
--- /dev/null
+++ b/test/synckolab/parser/kolab2/raw/task-progress.eml
@@ -0,0 +1,42 @@
+From: niko.berger@corinis.com
+Reply-To:
+Bcc:
+To: synckolab@no.tld
+Subject: d60bb769-2e63-47df-b80a-565aee273881
+Date: Fri, 18 May 2012 23:26:03 +0200
+Content-Type: Multipart/Mixed;boundary="Boundary-00=7DDD48994810AF6B"
+User-Agent: SyncKolab 2.0.0
+X-Kolab-Type: application/x-vnd.kolab.task
+
+--Boundary-00=7DDD48994810AF6B
+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/kolab2-clients.html
+---
+Summary: Neue Aufgabe in progress
+test
+---
+
+Notice:
+The information above is only valid, if no other client than synckolab updated this message. (ie. a client that updates the attachment but not the message)
+
+--Boundary-00=7DDD48994810AF6B
+Content-Type: application/x-vnd.kolab.task;
+ name="kolab.xml"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment;
+ filename="kolab.xml"
+
+PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHRhc2sgdmVyc2lvbj0iMS4wIiA+
+CiA8cHJvZHVjdC1pZD5TeW5ja29sYWIgMi4wLjAsIENhbGVuZGFyIFN5bmM8L3Byb2R1Y3QtaWQ+CiAg
+PHVpZD5kNjBiYjc2OS0yZTYzLTQ3ZGYtYjgwYS01NjVhZWUyNzM4ODE8L3VpZD4KICA8c3RhdHVzPmlu
+LXByb2dyZXNzPC9zdGF0dXM+CiAgPGNvbXBsZXRlZD4yMDwvY29tcGxldGVkPgogIDxzdW1tYXJ5Pk5l
+dWUgQXVmZ2FiZSBpbiBwcm9ncmVzczwvc3VtbWFyeT4KICA8c2Vuc2l0aXZpdHk+cHVibGljPC9zZW5z
+aXRpdml0eT4KICA8bG9jYXRpb24+dGVzdDwvbG9jYXRpb24+CiAgPHNob3ctdGltZS1hcz5idXN5PC9z
+aG93LXRpbWUtYXM+CiA8cmV2aXNpb24+MDwvcmV2aXNpb24+CjwvdGFzaz4K
+--Boundary-00=7DDD48994810AF6B--
diff --git a/test/synckolab/parser/kolab2/raw/task-recurr.eml b/test/synckolab/parser/kolab2/raw/task-recurr.eml
new file mode 100644
index 0000000..20fa917
--- /dev/null
+++ b/test/synckolab/parser/kolab2/raw/task-recurr.eml
@@ -0,0 +1,46 @@
+From: niko.berger@corinis.com
+Reply-To:
+Bcc:
+To: synckolab@no.tld
+Subject: 2009024d-3db1-402c-8535-4ce560d0fb84
+Date: Mon, 21 May 2012 22:40:05 +0200
+Content-Type: Multipart/Mixed;boundary="Boundary-00=9818724A46A9CA3B"
+User-Agent: SyncKolab 2.0.0
+X-Kolab-Type: application/x-vnd.kolab.task
+
+--Boundary-00=9818724A46A9CA3B
+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/kolab2-clients.html
+---
+Summary: Neue Aufgabe mit recurr
+Start date: 2012-05-23T21:00:00Z
+test
+---
+
+Notice:
+The information above is only valid, if no other client than synckolab updated this message. (ie. a client that updates the attachment but not the message)
+
+--Boundary-00=9818724A46A9CA3B
+Content-Type: application/x-vnd.kolab.task;
+ name="kolab.xml"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment;
+ filename="kolab.xml"
+
+PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHRhc2sgdmVyc2lvbj0iMS4wIiA+
+CiA8cHJvZHVjdC1pZD5TeW5ja29sYWIgMi4wLjAsIENhbGVuZGFyIFN5bmM8L3Byb2R1Y3QtaWQ+CiAg
+PHVpZD4yMDA5MDI0ZC0zZGIxLTQwMmMtODUzNS00Y2U1NjBkMGZiODQ8L3VpZD4KICA8c3RhdHVzPm5v
+dC1zdGFydGVkPC9zdGF0dXM+CiAgPHN0YXJ0LWRhdGU+MjAxMi0wNS0yM1QyMTowMDowMFo8L3N0YXJ0
+LWRhdGU+CiAgPHN1bW1hcnk+TmV1ZSBBdWZnYWJlIG1pdCByZWN1cnI8L3N1bW1hcnk+CiAgPGJvZHk+
+dGVzdDwvYm9keT4KICA8c2Vuc2l0aXZpdHk+cHVibGljPC9zZW5zaXRpdml0eT4KICA8c2hvdy10aW1l
+LWFzPmJ1c3k8L3Nob3ctdGltZS1hcz4KIDxyZWN1cnJlbmNlIGN5Y2xlPSJtb250aGx5IiB0eXBlPSJ3
+ZWVrZGF5Ij4KICA8ZGF5bnVtYmVyPi0xPC9kYXludW1iZXI+CiAgPGRheT5zdW5kYXk8L2RheT4KICA8
+aW50ZXJ2YWw+MTwvaW50ZXJ2YWw+CiAgPHJhbmdlIHR5cGU9Im5vbmUiLz4KIDwvcmVjdXJyZW5jZT4K
+IDxyZXZpc2lvbj4wPC9yZXZpc2lvbj4KPC90YXNrPgo=
+--Boundary-00=9818724A46A9CA3B--
diff --git a/test/synckolab/parser/kolab2/xml/task-alarm.xml b/test/synckolab/parser/kolab2/xml/task-alarm.xml
new file mode 100644
index 0000000..e028d87
--- /dev/null
+++ b/test/synckolab/parser/kolab2/xml/task-alarm.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<task version="1.0" >
+ <product-id>Synckolab 3.0.0, Calendar Sync</product-id>
+ <uid>a92bef47-9337-42f9-9df3-e42e6f4b34c2</uid>
+ <revision>0</revision>
+ <status>not-started</status>
+ <completed>0</completed>
+ <start-date>2012-05-21T21:00:00Z</start-date>
+ <summary>aufgabe with alarm</summary>
+ <sensitivity>public</sensitivity>
+ <show-time-as>busy</show-time-as>
+ <alarm description="Mozilla Standardbeschreibung" action="DISPLAY">120</alarm>
+ <revision>0</revision>
+</task> \ No newline at end of file
diff --git a/test/synckolab/parser/kolab2/xml/task-due.xml b/test/synckolab/parser/kolab2/xml/task-due.xml
new file mode 100644
index 0000000..700688a
--- /dev/null
+++ b/test/synckolab/parser/kolab2/xml/task-due.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<task version="1.0" >
+ <product-id>Synckolab 3.0.0, Calendar Sync</product-id>
+ <uid>d8939a36-63cf-4a19-b854-badbaacff8a1</uid>
+ <revision>0</revision>
+ <status>not-started</status>
+ <completed>0</completed>
+ <due-date>2012-05-18T21:00:00Z</due-date>
+ <summary>Neue Aufgabe mit due</summary>
+ <sensitivity>public</sensitivity>
+ <show-time-as>busy</show-time-as>
+ <revision>0</revision>
+</task> \ No newline at end of file
diff --git a/test/synckolab/parser/kolab2/xml/task-progress.xml b/test/synckolab/parser/kolab2/xml/task-progress.xml
new file mode 100644
index 0000000..54bd1c3
--- /dev/null
+++ b/test/synckolab/parser/kolab2/xml/task-progress.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<task version="1.0" >
+ <product-id>Synckolab 3.0.0, Calendar Sync</product-id>
+ <uid>d60bb769-2e63-47df-b80a-565aee273881</uid>
+ <revision>0</revision>
+ <status>in-progress</status>
+ <completed>20</completed>
+ <summary>Neue Aufgabe in progress</summary>
+ <sensitivity>public</sensitivity>
+ <location>test</location>
+ <show-time-as>busy</show-time-as>
+ <revision>0</revision>
+</task> \ No newline at end of file
diff --git a/test/synckolab/parser/kolab2/xml/task-recurr.xml b/test/synckolab/parser/kolab2/xml/task-recurr.xml
new file mode 100644
index 0000000..98a2119
--- /dev/null
+++ b/test/synckolab/parser/kolab2/xml/task-recurr.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<task version="1.0" >
+ <product-id>Synckolab 3.0.0, Calendar Sync</product-id>
+ <uid>2009024d-3db1-402c-8535-4ce560d0fb84</uid>
+ <revision>0</revision>
+ <status>not-started</status>
+ <completed>0</completed>
+ <start-date>2012-05-23T21:00:00Z</start-date>
+ <summary>Neue Aufgabe mit recurr</summary>
+ <body>test</body>
+ <sensitivity>public</sensitivity>
+ <show-time-as>busy</show-time-as>
+ <recurrence cycle="monthly" type="weekday">
+ <daynumber>-1</daynumber>
+ <day>sunday</day>
+ <interval>1</interval>
+ <range type="none"/>
+ </recurrence>
+ <revision>0</revision>
+</task> \ No newline at end of file
diff --git a/test/synckolab/parser/kolab3/contactTest.js b/test/synckolab/parser/kolab3/contactTest.js
index b24dc69..7de01dc 100644
--- a/test/synckolab/parser/kolab3/contactTest.js
+++ b/test/synckolab/parser/kolab3/contactTest.js
@@ -40,6 +40,8 @@ test("kolab3 synckolab.addressbookTools.parseMessageContent", function(){
equal(xmlcontent.replace(/[\n\r\t ]/g, ""), content.replace(/[\n\r\t ]/g, ""), src);
var diff = diffString(xmlcontent, content);
print("ERROR: DIFF FOUND:"+ xmlcontent.replace(/[\n\r\t ]/g, "").length + " vs. "+ content.replace(/[\n\r\t ]/g, "").length +"\n" + diff);
+ } else {
+ ok(src);
}
}
});
diff --git a/test/synckolab/parser/kolab3/raw/contact.test2.mime b/test/synckolab/parser/kolab3/raw/contact.test2.mime
index 04bcc40..cd3f375 100644
--- a/test/synckolab/parser/kolab3/raw/contact.test2.mime
+++ b/test/synckolab/parser/kolab3/raw/contact.test2.mime
@@ -3,6 +3,7 @@ Content-Type: text/plain; charset="US-ASCII"
From: grote2@demo.kolab.org
To: grote2@demo.kolab.org
Date: Mon, 08 Oct 2012 15:13:16 +0200
+Content-Type: Multipart/Mixed;boundary="=_fa2884819e665b9976ebbf6fea3ebc10"
X-Kolab-Type: application/x-vnd.kolab.contact
X-Kolab-Mime-Version: 3.0
Subject: ebf6fdc2-1149-11e2-841b-000476ed9009
diff --git a/test/synckolab/parser/kolab3/raw/list.test1.eml b/test/synckolab/parser/kolab3/raw/list.test1.eml
index f2171cb..caa71ed 100644
--- a/test/synckolab/parser/kolab3/raw/list.test1.eml
+++ b/test/synckolab/parser/kolab3/raw/list.test1.eml
@@ -1,10 +1,11 @@
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
-From: grote2@demo.kolab.org
-To: grote2@demo.kolab.org
+From: email@demo.kolab.org
+To: email@demo.kolab.org
Date: Mon, 08 Oct 2012 15:13:16 +0200
X-Kolab-Type: application/x-vnd.kolab.contact
X-Kolab-Mime-Version: 3.0
+Content-Type: Multipart/Mixed;boundary="=_fa2884819e665b9976ebbf6fea3ebc10"
Subject: ebf6fdc2-1149-11e2-841b-000476ed9009
User-Agent: Roundcube Webmail/0.9-0.10.git954540a3.el6.kolab_3.0