[CalendarServer-changes] [2262] CalDAVTester/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Fri Mar 28 09:43:35 PDT 2008
Revision: 2262
http://trac.macosforge.org/projects/calendarserver/changeset/2262
Author: cdaboo at apple.com
Date: 2008-03-28 09:43:35 -0700 (Fri, 28 Mar 2008)
Log Message:
-----------
Test to make sure only valid utf-8 calendar data is processed.
Modified Paths:
--------------
CalDAVTester/trunk/scripts/tests/nonascii.xml
Added Paths:
-----------
CalDAVTester/trunk/Resource/nonascii/10.ics
CalDAVTester/trunk/Resource/nonascii/11.ics
Added: CalDAVTester/trunk/Resource/nonascii/10.ics
===================================================================
--- CalDAVTester/trunk/Resource/nonascii/10.ics (rev 0)
+++ CalDAVTester/trunk/Resource/nonascii/10.ics 2008-03-28 16:43:35 UTC (rev 2262)
@@ -0,0 +1,30 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Cyrusoft International\, Inc.//Mulberry v4.0//EN
+VERSION:2.0
+BEGIN:VTIMEZONE
+LAST-MODIFIED:20040110T032845Z
+TZID:US/Eastern
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+DTSTAMP:20051222T205953Z
+DTSTART;TZID=US/Eastern:20060101T100000
+DURATION:PT1H
+SUMMARY:\xD4test\xD5
+UID:54E181BC7CCC373042B28842 at ninevah.local
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/nonascii/11.ics
===================================================================
--- CalDAVTester/trunk/Resource/nonascii/11.ics (rev 0)
+++ CalDAVTester/trunk/Resource/nonascii/11.ics 2008-03-28 16:43:35 UTC (rev 2262)
@@ -0,0 +1,34 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Cyrusoft International\, Inc.//Mulberry v4.0//EN
+VERSION:2.0
+METHOD:REQUEST
+BEGIN:VTIMEZONE
+LAST-MODIFIED:20040110T032845Z
+TZID:US/Eastern
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+DTSTAMP:20051222T205953Z
+DTSTART;TZID=US/Eastern:20060101T100000
+DURATION:PT1H
+SUMMARY:\xD4test\xD5
+UID:54E181BC7CCC373042B28842 at ninevah.local
+ORGANIZER;CN=User 01:$cuaddr1:
+ATTENDEE;CN=User 02:$cuaddr2:
+ATTENDEE;CN=User 03:$cuaddr3:
+END:VEVENT
+END:VCALENDAR
Modified: CalDAVTester/trunk/scripts/tests/nonascii.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/nonascii.xml 2008-03-28 16:30:27 UTC (rev 2261)
+++ CalDAVTester/trunk/scripts/tests/nonascii.xml 2008-03-28 16:43:35 UTC (rev 2262)
@@ -23,7 +23,12 @@
<caldavtest>
<description>Test use of UTF-8 for HTTP and calendar data</description>
- <start/>
+ <start>
+ <request end-delete="yes">
+ <method>MKCOL</method>
+ <ruri>$pathprefix:/collection/</ruri>
+ </request>
+ </start>
<test-suite name='MKCALENDAR' ignore="yes">
<test name='1'>
@@ -376,6 +381,145 @@
</test>
</test-suite>
+ <test-suite name='Non-utf-8 calendar data' ignore="no">
+ <test name='1'>
+ <description>PUT with non-utf-8 data without charset</description>
+ <request end-delete="yes">
+ <method>PUT</method>
+ <ruri>nonutf8.ics</ruri>
+ <data>
+ <content-type>text/calendar</content-type>
+ <filepath>Resource/nonascii/10.ics</filepath>
+ </data>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>urn:ietf:params:xml:ns:caldavvalid-calendar-data</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>PUT with non-utf-8 data with utf-8 charset</description>
+ <request end-delete="yes">
+ <method>PUT</method>
+ <ruri>nonutf8.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/10.ics</filepath>
+ </data>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>urn:ietf:params:xml:ns:caldavvalid-calendar-data</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>PUT with non-utf-8 data with non-utf-8 charset</description>
+ <request end-delete="yes">
+ <method>PUT</method>
+ <ruri>nonutf8.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=iso-8859-1</content-type>
+ <filepath>Resource/nonascii/10.ics</filepath>
+ </data>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>urn:ietf:params:xml:ns:caldavvalid-calendar-data</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Copy/Move Non-utf-8 calendar data' ignore="no">
+ <test name='1'>
+ <description>PUT with non-utf-8 data to regular collection</description>
+ <request end-delete="yes">
+ <method>PUT</method>
+ <ruri>$pathprefix:/collection/nonutf8.ics</ruri>
+ <data>
+ <content-type>text/calendar</content-type>
+ <filepath>Resource/nonascii/10.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>COPY non-utf-8 data to calendar collection</description>
+ <request end-delete="yes">
+ <method>COPY</method>
+ <header>
+ <name>Destination</name>
+ <value>$host:$calendarpath1:/copy1.ics</value>
+ </header>
+ <ruri>$pathprefix:/collection/nonutf8.ics</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>urn:ietf:params:xml:ns:caldavvalid-calendar-data</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>MOVE non-utf-8 data to calendar collection</description>
+ <request end-delete="yes">
+ <method>MOVE</method>
+ <header>
+ <name>Destination</name>
+ <value>$host:$calendarpath1:/copy1.ics</value>
+ </header>
+ <ruri>$pathprefix:/collection/nonutf8.ics</ruri>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>urn:ietf:params:xml:ns:caldavvalid-calendar-data</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name="POSTs" ignore='no'>
+ <test name='1'>
+ <description>POST with non-utf-8 data</description>
+ <request print-response='no'>
+ <method>POST</method>
+ <header>
+ <name>Originator</name>
+ <value>$cuaddr1:</value>
+ </header>
+ <header>
+ <name>Recipient</name>
+ <value>$cuaddr2:, $cuaddr3:</value>
+ </header>
+ <ruri>$pathprefix:/$outbox:/</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/11.ics</filepath>
+ </data>
+ <verify>
+ <callback>prepostcondition</callback>
+ <arg>
+ <name>error</name>
+ <value>urn:ietf:params:xml:ns:caldavvalid-calendar-data</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
<end/>
</caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080328/abb640cd/attachment-0001.html
More information about the calendarserver-changes
mailing list