[CalendarServer-changes] [11637] CalDAVTester/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Mon Aug 26 09:28:00 PDT 2013
Revision: 11637
http://trac.calendarserver.org//changeset/11637
Author: cdaboo at apple.com
Date: 2013-08-26 09:28:00 -0700 (Mon, 26 Aug 2013)
Log Message:
-----------
jCal tests - currently disabled.
Modified Paths:
--------------
CalDAVTester/trunk/README.txt
CalDAVTester/trunk/scripts/server/serverinfo-partitioning.xml
CalDAVTester/trunk/scripts/server/serverinfo-template.xml
CalDAVTester/trunk/scripts/server/serverinfo.xml
CalDAVTester/trunk/verifiers/xmlElementMatch.py
Added Paths:
-----------
CalDAVTester/trunk/Resource/CalDAV/json/
CalDAVTester/trunk/Resource/CalDAV/json/crud-bulk/
CalDAVTester/trunk/Resource/CalDAV/json/crud-bulk/1.xml
CalDAVTester/trunk/Resource/CalDAV/json/crud-bulk/2.ics
CalDAVTester/trunk/Resource/CalDAV/json/crud-bulk/3.ics
CalDAVTester/trunk/Resource/CalDAV/json/freebusy/
CalDAVTester/trunk/Resource/CalDAV/json/freebusy/1.ics
CalDAVTester/trunk/Resource/CalDAV/json/freebusy/2.json
CalDAVTester/trunk/Resource/CalDAV/json/get/
CalDAVTester/trunk/Resource/CalDAV/json/get/1.ics
CalDAVTester/trunk/Resource/CalDAV/json/get/2.json
CalDAVTester/trunk/Resource/CalDAV/json/multiget/
CalDAVTester/trunk/Resource/CalDAV/json/multiget/1.ics
CalDAVTester/trunk/Resource/CalDAV/json/multiget/2.xml
CalDAVTester/trunk/Resource/CalDAV/json/multiget/3.xml
CalDAVTester/trunk/Resource/CalDAV/json/put/
CalDAVTester/trunk/Resource/CalDAV/json/put/1.json
CalDAVTester/trunk/Resource/CalDAV/json/put/2.ics
CalDAVTester/trunk/Resource/CalDAV/json/query/
CalDAVTester/trunk/Resource/CalDAV/json/query/1.ics
CalDAVTester/trunk/Resource/CalDAV/json/query/2.xml
CalDAVTester/trunk/Resource/CalDAV/json/query/3.xml
CalDAVTester/trunk/Resource/CalDAV/json/scheduling/
CalDAVTester/trunk/Resource/CalDAV/json/simple-bulk/
CalDAVTester/trunk/Resource/CalDAV/json/simple-bulk/1.json
CalDAVTester/trunk/Resource/CalDAV/json/simple-bulk/2.ics
CalDAVTester/trunk/Resource/CalDAV/json/simple-bulk/3.ics
CalDAVTester/trunk/Resource/CalDAV/json/timezone-prop/
CalDAVTester/trunk/Resource/CalDAV/json/timezone-prop/1.xml
CalDAVTester/trunk/Resource/CalDAV/json/timezone-prop/2.xml
CalDAVTester/trunk/Resource/CalDAV/json/timezone-prop/3.xml
CalDAVTester/trunk/Resource/CalDAV/json/timezone-service/
CalDAVTester/trunk/scripts/tests/CalDAV/json.xml
CalDAVTester/trunk/verifiers/jcalDataMatch.py
Modified: CalDAVTester/trunk/README.txt
===================================================================
--- CalDAVTester/trunk/README.txt 2013-08-23 19:11:28 UTC (rev 11636)
+++ CalDAVTester/trunk/README.txt 2013-08-26 16:28:00 UTC (rev 11637)
@@ -493,7 +493,10 @@
<value>Content-type$text/plain</value>
</arg>
</verify>
-
+
+jcalDataMatch:
+ Like calendarDataMatch except that comparison is done using jCal data.
+
jsonPointerMatch:
Compares the response with a JSON pointer and returns TRUE if there
is a match, otherwise False.
@@ -749,9 +752,12 @@
[=text] - node text is "text".
[!text] - node text is not "text".
[*text] - node text contains "text".
+ [$text] - node text does not contain "text".
[+text] - node text starts with "text".
[^tag] - node has child element "tag".
[^tag=text] - node has child element "tag" with text "text".
+ [json] - node contains valid JSON data.
+ [icalendar] - node contains valid iCalendare data.
Argument: 'parent'
ElementTree style path for an XML element to use as the root for any
Added: CalDAVTester/trunk/Resource/CalDAV/json/crud-bulk/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/crud-bulk/1.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/crud-bulk/1.xml 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,397 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<MM:multiput xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:MM="http://me.com/_namespace/">
+<MM:resource>
+<D:set>
+<C:calendar-data content-type="application/calendar+json"><![CDATA[[
+ "vcalendar",
+ [
+ [
+ "version",
+ {},
+ "text",
+ "2.0"
+ ],
+ [
+ "prodid",
+ {},
+ "text",
+ "-//Example Inc.//Example Calendar//EN"
+ ]
+ ],
+ [
+ [
+ "vtimezone",
+ [
+ [
+ "tzid",
+ {},
+ "text",
+ "US/Eastern"
+ ],
+ [
+ "last-modified",
+ {},
+ "date-time",
+ "2004-01-10T03:28:45Z"
+ ]
+ ],
+ [
+ [
+ "daylight",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "2000-04-04T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 4
+ ],
+ "freq":"YEARLY",
+ "byday":[
+ "1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EDT"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-05:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-04:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "standard",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "2000-10-26T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 10
+ ],
+ "freq":"YEARLY",
+ "byday":[
+ "-1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EST"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-04:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-05:00"
+ ]
+ ],
+ []
+ ]
+ ]
+ ],
+ [
+ "vevent",
+ [
+ [
+ "uid",
+ {},
+ "text",
+ "user01-uid1"
+ ],
+ [
+ "dtstart",
+ {
+ "tzid":"US/Eastern"
+ },
+ "date-time",
+ "$now.year.1:-01-01T10:00:00"
+ ],
+ [
+ "duration",
+ {},
+ "duration",
+ "PT1H"
+ ],
+ [
+ "dtstamp",
+ {},
+ "date-time",
+ "2005-12-22T20:59:53Z"
+ ],
+ [
+ "organizer",
+ {},
+ "cal-address",
+ "$cuaddr1:"
+ ],
+ [
+ "summary",
+ {},
+ "text",
+ "event 1"
+ ]
+ ],
+ [
+ [
+ "valarm",
+ [
+ [
+ "action",
+ {},
+ "text",
+ "AUDIO"
+ ],
+ [
+ "trigger",
+ {
+ "related":"START"
+ },
+ "duration",
+ "-PT10M"
+ ]
+ ],
+ []
+ ]
+ ]
+ ]
+ ]
+]
+]]>
+</C:calendar-data>
+</D:set>
+</MM:resource>
+<MM:resource>
+<D:set>
+<C:calendar-data content-type="application/calendar+json"><![CDATA[[
+ "vcalendar",
+ [
+ [
+ "version",
+ {},
+ "text",
+ "2.0"
+ ],
+ [
+ "prodid",
+ {},
+ "text",
+ "-//Example Inc.//Example Calendar//EN"
+ ]
+ ],
+ [
+ [
+ "vtimezone",
+ [
+ [
+ "tzid",
+ {},
+ "text",
+ "US/Eastern"
+ ],
+ [
+ "last-modified",
+ {},
+ "date-time",
+ "2004-01-10T03:28:45Z"
+ ]
+ ],
+ [
+ [
+ "daylight",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "2000-04-04T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 4
+ ],
+ "freq":"YEARLY",
+ "byday":[
+ "1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EDT"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-05:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-04:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "standard",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "2000-10-26T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 10
+ ],
+ "freq":"YEARLY",
+ "byday":[
+ "-1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EST"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-04:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-05:00"
+ ]
+ ],
+ []
+ ]
+ ]
+ ],
+ [
+ "vevent",
+ [
+ [
+ "uid",
+ {},
+ "text",
+ "user01-uid2"
+ ],
+ [
+ "dtstart",
+ {
+ "tzid":"US/Eastern"
+ },
+ "date-time",
+ "$now.year.1:-01-02T10:00:00"
+ ],
+ [
+ "duration",
+ {},
+ "duration",
+ "PT1H"
+ ],
+ [
+ "dtstamp",
+ {},
+ "date-time",
+ "2005-12-22T20:59:53Z"
+ ],
+ [
+ "organizer",
+ {},
+ "cal-address",
+ "$cuaddr1:"
+ ],
+ [
+ "summary",
+ {},
+ "text",
+ "event 2"
+ ]
+ ],
+ [
+ [
+ "valarm",
+ [
+ [
+ "action",
+ {},
+ "text",
+ "AUDIO"
+ ],
+ [
+ "trigger",
+ {
+ "related":"START"
+ },
+ "duration",
+ "-PT10M"
+ ]
+ ],
+ []
+ ]
+ ]
+ ]
+ ]
+]
+]]>
+</C:calendar-data>
+</D:set>
+</MM:resource>
+</MM:multiput>
Added: CalDAVTester/trunk/Resource/CalDAV/json/crud-bulk/2.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/crud-bulk/2.ics (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/crud-bulk/2.ics 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,34 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Example Inc.//Example Calendar//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:user01-uid1
+DTSTART;TZID=US/Eastern:$now.year.1:0101T100000
+DURATION:PT1H
+DTSTAMP:20051222T205953Z
+ORGANIZER;CN=$username1:;EMAIL=$email1::$cuaddrurn1:
+SUMMARY:event 1
+BEGIN:VALARM
+ACTION:AUDIO
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/CalDAV/json/crud-bulk/3.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/crud-bulk/3.ics (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/crud-bulk/3.ics 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,34 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Example Inc.//Example Calendar//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:user01-uid2
+DTSTART;TZID=US/Eastern:$now.year.1:0102T100000
+DURATION:PT1H
+DTSTAMP:20051222T205953Z
+ORGANIZER;CN=$username1:;EMAIL=$email1::$cuaddrurn1:
+SUMMARY:event 2
+BEGIN:VALARM
+ACTION:AUDIO
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/CalDAV/json/freebusy/1.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/freebusy/1.ics (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/freebusy/1.ics 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,33 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Example Inc.//Example Calendar//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:54E181BC7CCC373042B28842 at ninevah.local
+DTSTART;TZID=US/Eastern:$now.year.1:0101T100000
+DURATION:PT1H
+DTSTAMP:20051222T205953Z
+SUMMARY:event 1
+BEGIN:VALARM
+ACTION:AUDIO
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/CalDAV/json/freebusy/2.json
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/freebusy/2.json (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/freebusy/2.json 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,25 @@
+[
+ "vcalendar",
+ [
+ ["calscale", {}, "text", "GREGORIAN"],
+ ["prodid", {}, "text", "-//Example Inc.//Example Calendar//EN"],
+ ["method", {}, "text", "REQUEST"],
+ ["version", {}, "text", "2.0"]
+ ],
+ [
+ [
+ "vfreebusy",
+ [
+ ["uid", {}, "text", "20060110T231240Z-4011c71-187-6f73-fb"],
+ ["organizer", {"cn": "$username1:"}, "cal-address", "$cuaddr1:"],
+ ["attendee", {"cn": "$username1:"}, "cal-address", "$cuaddr1:"],
+ ["attendee", {"cn": "$username2:"}, "cal-address", "$cuaddr2:"],
+ ["dtstart", {}, "date-time", "$now.year.1:0101T000000Z"],
+ ["dtstamp", {}, "date-time", "20060309T185105Z"],
+ ["dtend", {}, "date-time", "$now.year.1:0102T000000Z"]
+ ],
+ [
+ ]
+ ]
+ ]
+]
Added: CalDAVTester/trunk/Resource/CalDAV/json/get/1.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/get/1.ics (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/get/1.ics 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,33 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Example Inc.//Example Calendar//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:54E181BC7CCC373042B28842 at ninevah.local
+DTSTART;TZID=US/Eastern:$now.year.1:0101T100000
+DURATION:PT1H
+DTSTAMP:20051222T205953Z
+SUMMARY:event 1
+BEGIN:VALARM
+ACTION:AUDIO
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/CalDAV/json/get/2.json
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/get/2.json (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/get/2.json 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,185 @@
+[
+ "vcalendar",
+ [
+ [
+ "version",
+ {},
+ "text",
+ "2.0"
+ ],
+ [
+ "prodid",
+ {},
+ "text",
+ "-//Example Inc.//Example Calendar//EN"
+ ]
+ ],
+ [
+ [
+ "vtimezone",
+ [
+ [
+ "tzid",
+ {},
+ "text",
+ "US/Eastern"
+ ],
+ [
+ "last-modified",
+ {},
+ "date-time",
+ "2004-01-10T03:28:45Z"
+ ]
+ ],
+ [
+ [
+ "daylight",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "2000-04-04T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 4
+ ],
+ "freq":"YEARLY",
+ "byday":[
+ "1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EDT"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-05:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-04:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "standard",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "2000-10-26T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 10
+ ],
+ "freq":"YEARLY",
+ "byday":[
+ "-1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EST"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-04:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-05:00"
+ ]
+ ],
+ []
+ ]
+ ]
+ ],
+ [
+ "vevent",
+ [
+ [
+ "uid",
+ {},
+ "text",
+ "54E181BC7CCC373042B28842 at ninevah.local"
+ ],
+ [
+ "dtstart",
+ {
+ "tzid":"US/Eastern"
+ },
+ "date-time",
+ "$now.year.1:-01-01T10:00:00"
+ ],
+ [
+ "duration",
+ {},
+ "duration",
+ "PT1H"
+ ],
+ [
+ "dtstamp",
+ {},
+ "date-time",
+ "2005-12-22T20:59:53Z"
+ ],
+ [
+ "summary",
+ {},
+ "text",
+ "event 1"
+ ]
+ ],
+ [
+ [
+ "valarm",
+ [
+ [
+ "action",
+ {},
+ "text",
+ "AUDIO"
+ ],
+ [
+ "trigger",
+ {
+ "related":"START"
+ },
+ "duration",
+ "-PT10M"
+ ]
+ ],
+ []
+ ]
+ ]
+ ]
+ ]
+]
Added: CalDAVTester/trunk/Resource/CalDAV/json/multiget/1.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/multiget/1.ics (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/multiget/1.ics 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,33 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Example Inc.//Example Calendar//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:54E181BC7CCC373042B28842 at ninevah.local
+DTSTART;TZID=US/Eastern:$now.year.1:0101T100000
+DURATION:PT1H
+DTSTAMP:20051222T205953Z
+SUMMARY:event 1
+BEGIN:VALARM
+ACTION:AUDIO
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/CalDAV/json/multiget/2.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/multiget/2.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/multiget/2.xml 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<C:calendar-multiget xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:prop>
+<D:getetag/>
+<C:calendar-data content-type='application/calendar+json'/>
+</D:prop>
+<D:href>$calendarhome1:/calendar/1.ics</D:href>
+</C:calendar-multiget>
Added: CalDAVTester/trunk/Resource/CalDAV/json/multiget/3.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/multiget/3.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/multiget/3.xml 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<C:calendar-multiget xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:prop>
+<D:getetag/>
+<C:calendar-data content-type='application/calendar+json'>
+<C:comp name="VCALENDAR">
+<C:allprop/>
+<C:comp name="VTIMEZONE">
+<C:allprop/>
+<C:allcomp/>
+</C:comp>
+</C:comp>
+</C:calendar-data>
+</D:prop>
+<D:href>$calendarhome1:/calendar/1.ics</D:href>
+</C:calendar-multiget>
Added: CalDAVTester/trunk/Resource/CalDAV/json/put/1.json
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/put/1.json (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/put/1.json 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,185 @@
+[
+ "vcalendar",
+ [
+ [
+ "version",
+ {},
+ "text",
+ "2.0"
+ ],
+ [
+ "prodid",
+ {},
+ "text",
+ "-//Example Inc.//Example Calendar//EN"
+ ]
+ ],
+ [
+ [
+ "vtimezone",
+ [
+ [
+ "tzid",
+ {},
+ "text",
+ "US/Eastern"
+ ],
+ [
+ "last-modified",
+ {},
+ "date-time",
+ "2004-01-10T03:28:45Z"
+ ]
+ ],
+ [
+ [
+ "daylight",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "2000-04-04T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 4
+ ],
+ "freq":"YEARLY",
+ "byday":[
+ "1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EDT"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-05:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-04:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "standard",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "2000-10-26T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 10
+ ],
+ "freq":"YEARLY",
+ "byday":[
+ "-1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EST"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-04:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-05:00"
+ ]
+ ],
+ []
+ ]
+ ]
+ ],
+ [
+ "vevent",
+ [
+ [
+ "uid",
+ {},
+ "text",
+ "54E181BC7CCC373042B28842 at ninevah.local"
+ ],
+ [
+ "dtstart",
+ {
+ "tzid":"US/Eastern"
+ },
+ "date-time",
+ "$now.year.1:-01-01T10:00:00"
+ ],
+ [
+ "duration",
+ {},
+ "duration",
+ "PT1H"
+ ],
+ [
+ "dtstamp",
+ {},
+ "date-time",
+ "2005-12-22T20:59:53Z"
+ ],
+ [
+ "summary",
+ {},
+ "text",
+ "event 1"
+ ]
+ ],
+ [
+ [
+ "valarm",
+ [
+ [
+ "action",
+ {},
+ "text",
+ "AUDIO"
+ ],
+ [
+ "trigger",
+ {
+ "related":"START"
+ },
+ "duration",
+ "-PT10M"
+ ]
+ ],
+ []
+ ]
+ ]
+ ]
+ ]
+]
Added: CalDAVTester/trunk/Resource/CalDAV/json/put/2.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/put/2.ics (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/put/2.ics 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,33 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Example Inc.//Example Calendar//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:54E181BC7CCC373042B28842 at ninevah.local
+DTSTART;TZID=US/Eastern:$now.year.1:0101T100000
+DURATION:PT1H
+DTSTAMP:20051222T205953Z
+SUMMARY:event 1
+BEGIN:VALARM
+ACTION:AUDIO
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/CalDAV/json/query/1.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/query/1.ics (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/query/1.ics 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,33 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Example Inc.//Example Calendar//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:54E181BC7CCC373042B28842 at ninevah.local
+DTSTART;TZID=US/Eastern:$now.year.1:0101T100000
+DURATION:PT1H
+DTSTAMP:20051222T205953Z
+SUMMARY:event 1
+BEGIN:VALARM
+ACTION:AUDIO
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/CalDAV/json/query/2.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/query/2.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/query/2.xml 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:prop>
+<D:getetag/>
+<C:calendar-data content-type='application/calendar+json'/>
+</D:prop>
+<C:filter>
+<C:comp-filter name="VCALENDAR">
+<C:comp-filter name="VEVENT">
+<C:time-range start="$now.year.1:0101T000000Z" end="$now.year.1:0102T000000Z"/>
+</C:comp-filter>
+</C:comp-filter>
+</C:filter>
+</C:calendar-query>
Added: CalDAVTester/trunk/Resource/CalDAV/json/query/3.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/query/3.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/query/3.xml 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<C:calendar-query xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:prop>
+<D:getetag/>
+<C:calendar-data content-type='application/calendar+json'>
+<C:expand start='$now.year.1:0101T000000Z' end='$now.year.1:0105T000000Z'/>
+</C:calendar-data>
+</D:prop>
+<C:filter>
+<C:comp-filter name="VCALENDAR">
+<C:comp-filter name="VEVENT">
+<C:time-range start="$now.year.1:0101T000000Z" end="$now.year.1:0102T000000Z"/>
+</C:comp-filter>
+</C:comp-filter>
+</C:filter>
+</C:calendar-query>
Added: CalDAVTester/trunk/Resource/CalDAV/json/simple-bulk/1.json
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/simple-bulk/1.json (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/simple-bulk/1.json 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,256 @@
+[
+ "vcalendar",
+ [
+ [
+ "version",
+ {},
+ "text",
+ "2.0"
+ ],
+ [
+ "prodid",
+ {},
+ "text",
+ "-//Example Inc.//Example Calendar//EN"
+ ]
+ ],
+ [
+ [
+ "vtimezone",
+ [
+ [
+ "tzid",
+ {},
+ "text",
+ "US/Eastern"
+ ],
+ [
+ "last-modified",
+ {},
+ "date-time",
+ "2004-01-10T03:28:45Z"
+ ]
+ ],
+ [
+ [
+ "daylight",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "2000-04-04T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 4
+ ],
+ "freq":"YEARLY",
+ "byday":[
+ "1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EDT"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-05:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-04:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "standard",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "2000-10-26T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 10
+ ],
+ "freq":"YEARLY",
+ "byday":[
+ "-1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EST"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-04:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-05:00"
+ ]
+ ],
+ []
+ ]
+ ]
+ ],
+ [
+ "vevent",
+ [
+ [
+ "uid",
+ {},
+ "text",
+ "user01-uid1"
+ ],
+ [
+ "dtstart",
+ {
+ "tzid":"US/Eastern"
+ },
+ "date-time",
+ "$now.year.1:-01-01T10:00:00"
+ ],
+ [
+ "duration",
+ {},
+ "duration",
+ "PT1H"
+ ],
+ [
+ "dtstamp",
+ {},
+ "date-time",
+ "2005-12-22T20:59:53Z"
+ ],
+ [
+ "organizer",
+ {},
+ "cal-address",
+ "$cuaddr1:"
+ ],
+ [
+ "summary",
+ {},
+ "text",
+ "event 1"
+ ]
+ ],
+ [
+ [
+ "valarm",
+ [
+ [
+ "action",
+ {},
+ "text",
+ "AUDIO"
+ ],
+ [
+ "trigger",
+ {
+ "related":"START"
+ },
+ "duration",
+ "-PT10M"
+ ]
+ ],
+ []
+ ]
+ ]
+ ],
+ [
+ "vevent",
+ [
+ [
+ "uid",
+ {},
+ "text",
+ "user01-uid2"
+ ],
+ [
+ "dtstart",
+ {
+ "tzid":"US/Eastern"
+ },
+ "date-time",
+ "$now.year.1:-01-02T10:00:00"
+ ],
+ [
+ "duration",
+ {},
+ "duration",
+ "PT1H"
+ ],
+ [
+ "dtstamp",
+ {},
+ "date-time",
+ "2005-12-22T20:59:53Z"
+ ],
+ [
+ "organizer",
+ {},
+ "cal-address",
+ "$cuaddr1:"
+ ],
+ [
+ "summary",
+ {},
+ "text",
+ "event 2"
+ ]
+ ],
+ [
+ [
+ "valarm",
+ [
+ [
+ "action",
+ {},
+ "text",
+ "AUDIO"
+ ],
+ [
+ "trigger",
+ {
+ "related":"START"
+ },
+ "duration",
+ "-PT10M"
+ ]
+ ],
+ []
+ ]
+ ]
+ ]
+ ]
+]
Added: CalDAVTester/trunk/Resource/CalDAV/json/simple-bulk/2.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/simple-bulk/2.ics (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/simple-bulk/2.ics 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,34 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Example Inc.//Example Calendar//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:user01-uid1
+DTSTART;TZID=US/Eastern:$now.year.1:0101T100000
+DURATION:PT1H
+DTSTAMP:20051222T205953Z
+ORGANIZER;CN=$username1:;EMAIL=$email1::$cuaddrurn1:
+SUMMARY:event 1
+BEGIN:VALARM
+ACTION:AUDIO
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/CalDAV/json/simple-bulk/3.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/simple-bulk/3.ics (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/simple-bulk/3.ics 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,34 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//Example Inc.//Example Calendar//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:user01-uid2
+DTSTART;TZID=US/Eastern:$now.year.1:0102T100000
+DURATION:PT1H
+DTSTAMP:20051222T205953Z
+ORGANIZER;CN=$username1:;EMAIL=$email1::$cuaddrurn1:
+SUMMARY:event 2
+BEGIN:VALARM
+ACTION:AUDIO
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/CalDAV/json/timezone-prop/1.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/timezone-prop/1.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/timezone-prop/1.xml 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,779 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propertyupdate xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
+<D:set>
+<D:prop>
+ <C:calendar-timezone content-type="application/calendar+json"><![CDATA[[
+ "vcalendar",
+ [
+ [
+ "version",
+ {},
+ "text",
+ "2.0"
+ ],
+ [
+ "prodid",
+ {},
+ "text",
+ "-//CALENDARSERVER.ORG//NONSGML Version 1//EN"
+ ]
+ ],
+ [
+ [
+ "vtimezone",
+ [
+ [
+ "tzid",
+ {},
+ "text",
+ "America/New_York"
+ ],
+ [
+ "x-lic-location",
+ {},
+ "unknown",
+ "America/New_York"
+ ]
+ ],
+ [
+ [
+ "standard",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "1883-11-18T12:03:58"
+ ],
+ [
+ "rdate",
+ {},
+ "date-time",
+ "1883-11-18T12:03:58"
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EST"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-04:56:02"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-05:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "daylight",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "1918-03-31T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 3
+ ],
+ "freq":"YEARLY",
+ "until":"1920-03-28T07:00:00Z",
+ "byday":[
+ "-1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EDT"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-05:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-04:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "standard",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "1918-10-27T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 10
+ ],
+ "freq":"YEARLY",
+ "until":"1920-10-31T06:00:00Z",
+ "byday":[
+ "-1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EST"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-04:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-05:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "standard",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "1920-01-01T00:00:00"
+ ],
+ [
+ "rdate",
+ {},
+ "date-time",
+ "1920-01-01T00:00:00"
+ ],
+ [
+ "rdate",
+ {},
+ "date-time",
+ "1942-01-01T00:00:00"
+ ],
+ [
+ "rdate",
+ {},
+ "date-time",
+ "1946-01-01T00:00:00"
+ ],
+ [
+ "rdate",
+ {},
+ "date-time",
+ "1967-01-01T00:00:00"
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EST"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-05:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-05:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "daylight",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "1921-04-24T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 4
+ ],
+ "freq":"YEARLY",
+ "until":"1941-04-27T07:00:00Z",
+ "byday":[
+ "-1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EDT"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-05:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-04:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "standard",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "1921-09-25T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 9
+ ],
+ "freq":"YEARLY",
+ "until":"1941-09-28T06:00:00Z",
+ "byday":[
+ "-1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EST"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-04:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-05:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "daylight",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "1942-02-09T02:00:00"
+ ],
+ [
+ "rdate",
+ {},
+ "date-time",
+ "1942-02-09T02:00:00"
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EWT"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-05:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-04:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "daylight",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "1945-08-14T19:00:00"
+ ],
+ [
+ "rdate",
+ {},
+ "date-time",
+ "1945-08-14T19:00:00"
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EPT"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-04:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-04:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "standard",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "1945-09-30T02:00:00"
+ ],
+ [
+ "rdate",
+ {},
+ "date-time",
+ "1945-09-30T02:00:00"
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EST"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-04:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-05:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "daylight",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "1946-04-28T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 4
+ ],
+ "freq":"YEARLY",
+ "until":"1973-04-29T07:00:00Z",
+ "byday":[
+ "-1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EDT"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-05:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-04:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "standard",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "1946-09-29T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 9
+ ],
+ "freq":"YEARLY",
+ "until":"1954-09-26T06:00:00Z",
+ "byday":[
+ "-1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EST"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-04:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-05:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "standard",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "1955-10-30T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 10
+ ],
+ "freq":"YEARLY",
+ "until":"2006-10-29T06:00:00Z",
+ "byday":[
+ "-1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EST"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-04:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-05:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "daylight",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "1974-01-06T02:00:00"
+ ],
+ [
+ "rdate",
+ {},
+ "date-time",
+ "1974-01-06T02:00:00"
+ ],
+ [
+ "rdate",
+ {},
+ "date-time",
+ "1975-02-23T02:00:00"
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EDT"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-05:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-04:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "daylight",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "1976-04-25T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 4
+ ],
+ "freq":"YEARLY",
+ "until":"1986-04-27T07:00:00Z",
+ "byday":[
+ "-1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EDT"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-05:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-04:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "daylight",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "1987-04-05T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 4
+ ],
+ "freq":"YEARLY",
+ "until":"2006-04-02T07:00:00Z",
+ "byday":[
+ "1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EDT"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-05:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-04:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "daylight",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "2007-03-11T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 3
+ ],
+ "freq":"YEARLY",
+ "byday":[
+ "2SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EDT"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-05:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-04:00"
+ ]
+ ],
+ []
+ ],
+ [
+ "standard",
+ [
+ [
+ "dtstart",
+ {},
+ "date-time",
+ "2007-11-04T02:00:00"
+ ],
+ [
+ "rrule",
+ {},
+ "recur",
+ {
+ "bymonth":[
+ 11
+ ],
+ "freq":"YEARLY",
+ "byday":[
+ "1SU"
+ ]
+ }
+ ],
+ [
+ "tzname",
+ {},
+ "text",
+ "EST"
+ ],
+ [
+ "tzoffsetfrom",
+ {},
+ "utc-offset",
+ "-04:00"
+ ],
+ [
+ "tzoffsetto",
+ {},
+ "utc-offset",
+ "-05:00"
+ ]
+ ],
+ []
+ ]
+ ]
+ ]
+ ]
+]
+]]></C:calendar-timezone>
+</D:prop>
+</D:set>
+</D:propertyupdate>
Added: CalDAVTester/trunk/Resource/CalDAV/json/timezone-prop/2.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/timezone-prop/2.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/timezone-prop/2.xml 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<x0:propfind xmlns:x0="DAV:" xmlns:x3="http://apple.com/ns/ical/" xmlns:x1="http://calendarserver.org/ns/" xmlns:x2="urn:ietf:params:xml:ns:caldav">
+ <x0:prop>
+ <x2:calendar-timezone content-type="application/calendar+json"/>
+ </x0:prop>
+</x0:propfind>
Added: CalDAVTester/trunk/Resource/CalDAV/json/timezone-prop/3.xml
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/json/timezone-prop/3.xml (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/json/timezone-prop/3.xml 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<x0:propfind xmlns:x0="DAV:" xmlns:x3="http://apple.com/ns/ical/" xmlns:x1="http://calendarserver.org/ns/" xmlns:x2="urn:ietf:params:xml:ns:caldav">
+ <x0:prop>
+ <x2:calendar-timezone/>
+ </x0:prop>
+</x0:propfind>
Modified: CalDAVTester/trunk/scripts/server/serverinfo-partitioning.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/serverinfo-partitioning.xml 2013-08-23 19:11:28 UTC (rev 11636)
+++ CalDAVTester/trunk/scripts/server/serverinfo-partitioning.xml 2013-08-26 16:28:00 UTC (rev 11637)
@@ -61,6 +61,8 @@
<!-- <feature>per-object-ACLs</feature> --> <!-- ACL for objects in calendar/address books -->
<!-- <feature>regular-collection</feature> --> <!-- Regular collections allowed in calendar/address book homes -->
+ <!-- <feature>json-data</feature> --> <!-- jCal and jCard support -->
+
<!-- CalDAV specific extension -->
<feature>caldav</feature> <!-- Basic CalDAV feature enabler -->
<feature>auto-accept</feature> <!-- Auto-accept for rooms & locations -->
Modified: CalDAVTester/trunk/scripts/server/serverinfo-template.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/serverinfo-template.xml 2013-08-23 19:11:28 UTC (rev 11636)
+++ CalDAVTester/trunk/scripts/server/serverinfo-template.xml 2013-08-26 16:28:00 UTC (rev 11637)
@@ -61,6 +61,8 @@
<!-- <feature>per-object-ACLs</feature> --> <!-- ACL for objects in calendar/address books -->
<!-- <feature>regular-collection</feature> --> <!-- Regular collections allowed in calendar/address book homes -->
+ <!-- <feature>json-data</feature> --> <!-- jCal and jCard support -->
+
<!-- CalDAV specific extension -->
<feature>caldav</feature> <!-- Basic CalDAV feature enabler -->
<feature>auto-accept</feature> <!-- Auto-accept for rooms & locations -->
Modified: CalDAVTester/trunk/scripts/server/serverinfo.xml
===================================================================
--- CalDAVTester/trunk/scripts/server/serverinfo.xml 2013-08-23 19:11:28 UTC (rev 11636)
+++ CalDAVTester/trunk/scripts/server/serverinfo.xml 2013-08-26 16:28:00 UTC (rev 11637)
@@ -61,6 +61,8 @@
<!-- <feature>per-object-ACLs</feature> --> <!-- ACL for objects in calendar/address books -->
<!-- <feature>regular-collection</feature> --> <!-- Regular collections allowed in calendar/address book homes -->
+ <!-- <feature>json-data</feature> --> <!-- jCal and jCard support -->
+
<!-- CalDAV specific extension -->
<feature>caldav</feature> <!-- Basic CalDAV feature enabler -->
<feature>auto-accept</feature> <!-- Auto-accept for rooms & locations -->
Added: CalDAVTester/trunk/scripts/tests/CalDAV/json.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/json.xml (rev 0)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/json.xml 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,972 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2013 Apple Inc. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<caldavtest>
+ <description>Test PUT method in CalDAV</description>
+
+ <require-feature>
+ <feature>caldav</feature>
+ <feature>json-data</feature>
+ </require-feature>
+
+ <start/>
+
+ <test-suite name='PUT iCal/GET json' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>PUT iCalendar</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/get/1.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>GET jCal</description>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <header>
+ <name>Accept</name>
+ <value>application/calendar+json</value>
+ </header>
+ <verify>
+ <callback>jcalDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/get/2.json</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='-1' ignore='no'>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='PUT json/GET json/icalendar + Accept/q' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>PUT jCal</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <data>
+ <content-type>application/calendar+json; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/put/1.json</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>GET jCal</description>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <header>
+ <name>Accept</name>
+ <value>application/calendar+json</value>
+ </header>
+ <verify>
+ <callback>jcalDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/put/1.json</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>GET iCalendar - with accept</description>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <header>
+ <name>Accept</name>
+ <value>text/calendar</value>
+ </header>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/put/2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>GET iCalendar - no accept</description>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/put/2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5' ignore='no'>
+ <description>GET jCal - preferred Accept</description>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <header>
+ <name>Accept</name>
+ <value>application/calendar+json, text/calendar</value>
+ </header>
+ <verify>
+ <callback>jcalDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/put/1.json</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <description>GET jCal - q= preferred Accept</description>
+ <request>
+ <method>GET</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <header>
+ <name>Accept</name>
+ <value>text/calendar;q=0.2, application/calendar+json;q=0.5</value>
+ </header>
+ <verify>
+ <callback>jcalDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/put/1.json</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='-1' ignore='no'>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='PUT + return-rep' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>PUT jCal/return iCalendar</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <header>
+ <name>Prefer</name>
+ <value>return=representation</value>
+ </header>
+ <data>
+ <content-type>application/calendar+json; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/put/1.json</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/put/2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>PUT jCal/return jCal</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <header>
+ <name>Prefer</name>
+ <value>return=representation</value>
+ </header>
+ <header>
+ <name>Accept</name>
+ <value>application/calendar+json</value>
+ </header>
+ <data>
+ <content-type>application/calendar+json; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/put/1.json</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ <verify>
+ <callback>jcalDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/put/1.json</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>PUT iCalendar/return iCalendar</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <header>
+ <name>Prefer</name>
+ <value>return=representation</value>
+ </header>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/put/2.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/put/2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>PUT iCalendar/return jCal</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <header>
+ <name>Prefer</name>
+ <value>return=representation</value>
+ </header>
+ <header>
+ <name>Accept</name>
+ <value>application/calendar+json</value>
+ </header>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/put/2.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ <verify>
+ <callback>jcalDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/put/1.json</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='-1' ignore='no'>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Multiget json' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>PUT iCalendar</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/multiget/1.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>multiget jCal</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/multiget/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{DAV:}getetag</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[@content-type="application/calendar+json"]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[json]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vcalendar]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vtimezone]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vevent]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*valarm]</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>multiget with filtered jCal</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/multiget/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{DAV:}getetag</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[@content-type="application/calendar+json"]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[json]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vcalendar]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vtimezone]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[$vevent]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[$valarm]</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='-1' ignore='no'>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Query json' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>PUT iCalendar</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/query/1.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>query jCal</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/query/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{DAV:}getetag</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[@content-type="application/calendar+json"]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[json]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vcalendar]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vtimezone]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vevent]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*valarm]</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>query with expanded jCal</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/query/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>1.ics</value>
+ </arg>
+ </verify>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{DAV:}getetag</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[@content-type="application/calendar+json"]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[json]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vcalendar]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[$vtimezone]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[$US/Eastern]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vevent]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*valarm]</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='-1' ignore='no'>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Freebusy json' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>PUT iCalendar</description>
+ <request>
+ <method>PUT</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/freebusy/1.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>POST json - get back json</description>
+ <request>
+ <method>POST</method>
+ <ruri>$outboxpath1:/</ruri>
+ <data>
+ <content-type>application/calendar+json; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/freebusy/2.json</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>{$CALDAV}schedule-response/{$CALDAV:}response/{$CALDAV:}calendar-data[@content-type="application/calendar+json"]</value>
+ <value>{$CALDAV}schedule-response/{$CALDAV:}response/{$CALDAV:}calendar-data[json]</value>
+ <value>{$CALDAV}schedule-response/{$CALDAV:}response/{$CALDAV:}calendar-data[*vcalendar]</value>
+ <value>{$CALDAV}schedule-response/{$CALDAV:}response/{$CALDAV:}calendar-data[*vfreebusy]</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='-1' ignore='no'>
+ <request>
+ <method>DELETE</method>
+ <ruri>$calendarpath1:/1.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='POST;add-member' ignore='no'>
+ <require-feature>
+ <feature>add-member</feature>
+ </require-feature>
+ <test name='1' ignore='no'>
+ <description>POST;add-member jCal</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarpath1:/$add-member:</ruri>
+ <data>
+ <content-type>application/calendar+json; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/put/1.json</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ <grabheader>
+ <name>Location</name>
+ <variable>$posted:</variable>
+ </grabheader>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>GET jCal</description>
+ <request>
+ <method>GET</method>
+ <ruri>$posted:</ruri>
+ <header>
+ <name>Accept</name>
+ <value>application/calendar+json</value>
+ </header>
+ <verify>
+ <callback>jcalDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/put/1.json</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>GET iCalendar</description>
+ <request>
+ <method>GET</method>
+ <ruri>$posted:</ruri>
+ <header>
+ <name>Accept</name>
+ <value>text/calendar</value>
+ </header>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/put/2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='-1' ignore='no'>
+ <request>
+ <method>DELETE</method>
+ <ruri>$posted:</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='POST;add-member - return' ignore='no'>
+ <require-feature>
+ <feature>add-member</feature>
+ </require-feature>
+ <test name='1' ignore='no'>
+ <description>POST;add-member jCal</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarpath1:/$add-member:</ruri>
+ <header>
+ <name>Prefer</name>
+ <value>return=representation</value>
+ </header>
+ <header>
+ <name>Accept</name>
+ <value>application/calendar+json</value>
+ </header>
+ <data>
+ <content-type>application/calendar+json; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/put/1.json</filepath>
+ </data>
+ <verify>
+ <callback>jcalDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/put/1.json</value>
+ </arg>
+ </verify>
+ <grabheader>
+ <name>Location</name>
+ <variable>$posted:</variable>
+ </grabheader>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>GET jCal</description>
+ <request>
+ <method>GET</method>
+ <ruri>$posted:</ruri>
+ <header>
+ <name>Accept</name>
+ <value>application/calendar+json</value>
+ </header>
+ <verify>
+ <callback>jcalDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/put/1.json</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>GET iCalendar</description>
+ <request>
+ <method>GET</method>
+ <ruri>$posted:</ruri>
+ <header>
+ <name>Accept</name>
+ <value>text/calendar</value>
+ </header>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/put/2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='-1' ignore='no'>
+ <request>
+ <method>DELETE</method>
+ <ruri>$posted:</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Simple BULK json - no return' ignore='no'>
+ <require-feature>
+ <feature>bulk-post</feature>
+ </require-feature>
+ <test name='1' ignore='no'>
+ <description>POST jCal</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>application/calendar+json; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/simple-bulk/1.json</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{DAV:}getetag</value>
+ <value>$verify-property-prefix:/{http://calendarserver.org/ns/}uid[=user01-uid1]</value>
+ <value>$verify-property-prefix:/{http://calendarserver.org/ns/}uid[=user01-uid2]</value>
+ </arg>
+ <arg>
+ <name>notexists</name>
+ <value>$verify-property-prefix:/{urn:ietf:params:xml:ns:caldav}calendar-data</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>$multistatus-href-prefix:</name>
+ <variable>$href1:</variable>
+ <variable>$href2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>GET iCalendar</description>
+ <request>
+ <method>GET</method>
+ <ruri>$href1:</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/simple-bulk/2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>GET iCalendar</description>
+ <request>
+ <method>GET</method>
+ <ruri>$href2:</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/simple-bulk/3.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='-1' ignore='no'>
+ <request>
+ <method>DELETEALL</method>
+ <ruri>$calendarpath1:/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Simple BULK json - return' ignore='no'>
+ <require-feature>
+ <feature>bulk-post</feature>
+ </require-feature>
+ <test name='1' ignore='no'>
+ <description>POST jCal</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarpath1:/</ruri>
+ <header>
+ <name>X-MobileMe-DAV-Options</name>
+ <value>return-changed-data</value>
+ </header>
+ <data>
+ <content-type>application/calendar+json; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/simple-bulk/1.json</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{DAV:}getetag</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[@content-type="application/calendar+json"]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[json]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vcalendar]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*vevent]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*user01-uid1]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-data[*user01-uid2]</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>$multistatus-href-prefix:</name>
+ <variable>$href1:</variable>
+ <variable>$href2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>GET iCalendar</description>
+ <request>
+ <method>GET</method>
+ <ruri>$href1:</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/simple-bulk/2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>GET iCalendar</description>
+ <request>
+ <method>GET</method>
+ <ruri>$href2:</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/simple-bulk/3.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='-1' ignore='no'>
+ <request>
+ <method>DELETEALL</method>
+ <ruri>$calendarpath1:/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='CRUD json' ignore='no'>
+ <require-feature>
+ <feature>bulk-post</feature>
+ </require-feature>
+ <test name='1' ignore='no'>
+ <description>POST jCal</description>
+ <request>
+ <method>POST</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/crud-bulk/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{DAV:}getetag</value>
+ <value>$verify-property-prefix:/{http://calendarserver.org/ns/}uid[=user01-uid1]</value>
+ <value>$verify-property-prefix:/{http://calendarserver.org/ns/}uid[=user01-uid2]</value>
+ </arg>
+ <arg>
+ <name>notexists</name>
+ <value>$verify-property-prefix:/{urn:ietf:params:xml:ns:caldav}calendar-data</value>
+ </arg>
+ </verify>
+ <grabelement>
+ <name>$multistatus-href-prefix:</name>
+ <variable>$href1:</variable>
+ <variable>$href2:</variable>
+ </grabelement>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>GET iCalendar</description>
+ <request>
+ <method>GET</method>
+ <ruri>$href1:</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/crud-bulk/2.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>GET iCalendar</description>
+ <request>
+ <method>GET</method>
+ <ruri>$href2:</ruri>
+ <verify>
+ <callback>calendarDataMatch</callback>
+ <arg>
+ <name>filepath</name>
+ <value>Resource/CalDAV/json/crud-bulk/3.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='-1' ignore='no'>
+ <request>
+ <method>DELETEALL</method>
+ <ruri>$calendarpath1:/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Timezone prop json' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>PROPPATCH jCal</description>
+ <request>
+ <method>PROPPATCH</method>
+ <ruri>$calendarpath1:/</ruri>
+ <data>
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/timezone-prop/1.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>PROPFIND jCal</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$calendarpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/timezone-prop/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-timezone[@content-type="application/calendar+json"]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-timezone[json]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-timezone[*vcalendar]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-timezone[*vtimezone]</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>GET iCalendar - with accept</description>
+ <request>
+ <method>PROPFIND</method>
+ <ruri>$calendarpath1:/</ruri>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <data>
+ <content-type>application/xml; charset=utf-8</content-type>
+ <filepath>Resource/CalDAV/json/timezone-prop/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>xmlElementMatch</callback>
+ <arg>
+ <name>exists</name>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-timezone[icalendar]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-timezone[*BEGIN:VCALENDAR]</value>
+ <value>$verify-property-prefix:/{$CALDAV:}calendar-timezone[*BEGIN:VTIMEZONE]</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Timezone service json' ignore='no'>
+ </test-suite>
+
+ <end/>
+
+</caldavtest>
Added: CalDAVTester/trunk/verifiers/jcalDataMatch.py
===================================================================
--- CalDAVTester/trunk/verifiers/jcalDataMatch.py (rev 0)
+++ CalDAVTester/trunk/verifiers/jcalDataMatch.py 2013-08-26 16:28:00 UTC (rev 11637)
@@ -0,0 +1,130 @@
+##
+# Copyright (c) 2013 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+from difflib import unified_diff
+import json
+
+"""
+Verifier that checks the response body for a semantic match to data in a file.
+"""
+
+class Verifier(object):
+
+ def verify(self, manager, uri, response, respdata, args): #@UnusedVariable
+ # Get arguments
+ files = args.get("filepath", [])
+ caldata = args.get("data", [])
+ filters = args.get("filter", [])
+
+ if "EMAIL parameter" not in manager.server_info.features:
+ filters.append("ATTENDEE:EMAIL")
+ filters.append("ORGANIZER:EMAIL")
+ filters.append("ATTENDEE:X-CALENDARSERVER-DTSTAMP")
+ filters.append("CALSCALE")
+ filters.append("PRODID")
+ filters.append("DTSTAMP")
+ filters.append("CREATED")
+ filters.append("LAST-MODIFIED")
+ filters.append("X-WR-CALNAME")
+
+ for afilter in tuple(filters):
+ if afilter[0] == "!" and afilter[1:] in filters:
+ filters.remove(afilter[1:])
+ filters = filter(lambda x: x[0] != "!", filters)
+
+ # status code must be 200, 201, 207
+ if response.status not in (200, 201, 207):
+ return False, " HTTP Status Code Wrong: %d" % (response.status,)
+
+ # look for response data
+ if not respdata:
+ return False, " No response body"
+
+ # look for content-type
+ hdrs = response.msg.getheaders("Content-Type")
+ if hdrs is None or len(hdrs) == 0:
+ return False, " No Content-Type header"
+ if len(hdrs) != 1:
+ return False, " Wrong number of Content-Type headers"
+ if hdrs[0].split(";")[0] != "application/calendar+json":
+ return False, " Wrong Content-Type header"
+
+ # look for one file
+ if len(files) != 1 and len(caldata) != 1:
+ return False, " No file to compare response to"
+
+ # read in all data from specified file or use provided data
+ if len(files):
+ fd = open(files[0], "r")
+ try:
+ try:
+ data = fd.read()
+ finally:
+ fd.close()
+ except:
+ data = None
+ else:
+ data = caldata[0] if len(caldata) else None
+
+ if data is None:
+ return False, " Could not read data file"
+
+ data = manager.server_info.extrasubs(manager.server_info.subs(data))
+
+ def removePropertiesParameters(component):
+
+ # component = [name, props-array, subcomponent-array]
+
+ for subcomponent in component[2]:
+ removePropertiesParameters(subcomponent)
+
+ for pos, property in reversed(tuple(enumerate(component[1]))):
+
+ # property = [name, param-dict, value-type, values...]
+
+ # Always reset DTSTAMP on these properties
+ if property[0] in ("ATTENDEE".lower(), "X-CALENDARSERVER-ATTENDEE-COMMENT".lower()):
+ if "X-CALENDARSERVER-DTSTAMP".lower() in property[1]:
+ property[1]["X-CALENDARSERVER-DTSTAMP".lower()] = "20080101T000000Z"
+
+ for filter in filters:
+ if ":" in filter:
+ propname, parameter = filter.split(":")
+ if property[0] == propname.lower():
+ if parameter.lower in property[1]:
+ del property[1][parameter.lower()]
+ else:
+ if property[0] == filter.lower():
+ del component[1][pos]
+
+ try:
+ resp_calendar = json.loads(respdata)
+ removePropertiesParameters(resp_calendar)
+ respdata = json.dumps(resp_calendar)
+
+ data_calendar = json.loads(data)
+ removePropertiesParameters(data_calendar)
+ data = json.dumps(data_calendar)
+
+ result = respdata == data
+
+ if result:
+ return True, ""
+ else:
+ error_diff = "\n".join([line for line in unified_diff(data.split("\n"), respdata.split("\n"))])
+ return False, " Response data does not exactly match file data%s" % (error_diff,)
+ except Exception, e:
+ return False, " Response data is not calendar data: %s" % (e,)
Modified: CalDAVTester/trunk/verifiers/xmlElementMatch.py
===================================================================
--- CalDAVTester/trunk/verifiers/xmlElementMatch.py 2013-08-23 19:11:28 UTC (rev 11636)
+++ CalDAVTester/trunk/verifiers/xmlElementMatch.py 2013-08-26 16:28:00 UTC (rev 11637)
@@ -19,7 +19,9 @@
Verifier that checks the response body for an exact match to data in a file.
"""
+from pycalendar.calendar import PyCalendar
from xml.etree.ElementTree import ElementTree
+import json
import StringIO
class Verifier(object):
@@ -124,6 +126,9 @@
elif test[0] == '*':
if node.text is not None and node.text.find(test[1:]) != -1:
results.append(node)
+ elif test[0] == '$':
+ if node.text is not None and node.text.find(test[1:]) == -1:
+ results.append(node)
elif test[0] == '+':
if node.text is not None and node.text.startswith(test[1:]):
results.append(node)
@@ -196,6 +201,9 @@
elif test[0] == '*':
if node.text is None or node.text.find(test[1:]) == -1:
result = " Incorrect value returned in XML for %s\n" % (path,)
+ elif test[0] == '$':
+ if node.text is None or node.text.find(test[1:]) != -1:
+ result = " Incorrect value returned in XML for %s\n" % (path,)
elif test[0] == '+':
if node.text is None or not node.text.startswith(test[1:]):
result = " Incorrect value returned in XML for %s\n" % (path,)
@@ -210,6 +218,20 @@
break
else:
result = " Missing child returned in XML for %s\n" % (path,)
+
+ # Try to parse as iCalendar
+ elif test == 'icalendar':
+ try:
+ PyCalendar.parseText(node.text)
+ except:
+ result = " Incorrect value returned in iCalendar for %s\n" % (path,)
+
+ # Try to parse as JSON
+ elif test == 'json':
+ try:
+ json.loads(node.text)
+ except:
+ result = " Incorrect value returned in XML for %s\n" % (path,)
return result
testresult = _doTest()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130826/e2180545/attachment-0001.html>
More information about the calendarserver-changes
mailing list