[CalendarServer-changes] [1612] CalDAVTester/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jun 20 14:02:35 PDT 2007
Revision: 1612
http://trac.macosforge.org/projects/calendarserver/changeset/1612
Author: cdaboo at apple.com
Date: 2007-06-20 14:02:35 -0700 (Wed, 20 Jun 2007)
Log Message:
-----------
Tests for utf-8. Currently the uri tests are ignored as supporting IRIs (utf-8 in uris) requires major changes to Twisted
and strictly speaking http only does plain (ascii) uris for now.
Added Paths:
-----------
CalDAVTester/trunk/Resource/nonascii/
CalDAVTester/trunk/Resource/nonascii/1.ics
CalDAVTester/trunk/Resource/nonascii/2.xml
CalDAVTester/trunk/Resource/nonascii/3.xml
CalDAVTester/trunk/Resource/nonascii/4.xml
CalDAVTester/trunk/Resource/nonascii/5.xml
CalDAVTester/trunk/Resource/nonascii/6.ics
CalDAVTester/trunk/Resource/nonascii/7.xml
CalDAVTester/trunk/Resource/nonascii/8.xml
CalDAVTester/trunk/Resource/nonascii/9.xml
CalDAVTester/trunk/scripts/tests/nonascii.xml
Added: CalDAVTester/trunk/Resource/nonascii/1.ics
===================================================================
--- CalDAVTester/trunk/Resource/nonascii/1.ics (rev 0)
+++ CalDAVTester/trunk/Resource/nonascii/1.ics 2007-06-20 21:02:35 UTC (rev 1612)
@@ -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:event 1
+UID:54E181BC7CCC373042B28842 at ninevah.local
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/nonascii/2.xml
===================================================================
--- CalDAVTester/trunk/Resource/nonascii/2.xml (rev 0)
+++ CalDAVTester/trunk/Resource/nonascii/2.xml 2007-06-20 21:02:35 UTC (rev 1612)
@@ -0,0 +1,7 @@
+<?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/>
+</D:prop>
+<D:href>$pathprefix:/Te%cc%81st/te%cc%81st.ics</D:href>
+</C:calendar-multiget>
Added: CalDAVTester/trunk/Resource/nonascii/3.xml
===================================================================
--- CalDAVTester/trunk/Resource/nonascii/3.xml (rev 0)
+++ CalDAVTester/trunk/Resource/nonascii/3.xml 2007-06-20 21:02:35 UTC (rev 1612)
@@ -0,0 +1,7 @@
+<?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/>
+</D:prop>
+<D:href>$pathprefix:/Te%cc%81st/t%c3%a9st.ics</D:href>
+</C:calendar-multiget>
Added: CalDAVTester/trunk/Resource/nonascii/4.xml
===================================================================
--- CalDAVTester/trunk/Resource/nonascii/4.xml (rev 0)
+++ CalDAVTester/trunk/Resource/nonascii/4.xml 2007-06-20 21:02:35 UTC (rev 1612)
@@ -0,0 +1,7 @@
+<?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/>
+</D:prop>
+<D:href>$pathprefix:/T%c3%a9st/te%cc%81st.ics</D:href>
+</C:calendar-multiget>
Added: CalDAVTester/trunk/Resource/nonascii/5.xml
===================================================================
--- CalDAVTester/trunk/Resource/nonascii/5.xml (rev 0)
+++ CalDAVTester/trunk/Resource/nonascii/5.xml 2007-06-20 21:02:35 UTC (rev 1612)
@@ -0,0 +1,7 @@
+<?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/>
+</D:prop>
+<D:href>$pathprefix:/T%c3%a9st/t%c3%a9st.ics</D:href>
+</C:calendar-multiget>
Added: CalDAVTester/trunk/Resource/nonascii/6.ics
===================================================================
--- CalDAVTester/trunk/Resource/nonascii/6.ics (rev 0)
+++ CalDAVTester/trunk/Resource/nonascii/6.ics 2007-06-20 21:02:35 UTC (rev 1612)
@@ -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:tést
+UID:54E181BC7CCC373042B28842 at ninevah.local
+END:VEVENT
+END:VCALENDAR
Added: CalDAVTester/trunk/Resource/nonascii/7.xml
===================================================================
--- CalDAVTester/trunk/Resource/nonascii/7.xml (rev 0)
+++ CalDAVTester/trunk/Resource/nonascii/7.xml 2007-06-20 21:02:35 UTC (rev 1612)
@@ -0,0 +1,13 @@
+<?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/>
+</D:prop>
+<C:filter>
+<C:comp-filter name="VCALENDAR">
+<C:comp-filter name="VEVENT">
+</C:comp-filter>
+</C:comp-filter>
+</C:filter>
+</C:calendar-query>
Added: CalDAVTester/trunk/Resource/nonascii/8.xml
===================================================================
--- CalDAVTester/trunk/Resource/nonascii/8.xml (rev 0)
+++ CalDAVTester/trunk/Resource/nonascii/8.xml 2007-06-20 21:02:35 UTC (rev 1612)
@@ -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/>
+</D:prop>
+<C:filter>
+<C:comp-filter name="VCALENDAR">
+<C:comp-filter name="VEVENT">
+<C:prop-filter name="SUMMARY">
+<C:text-match>t</C:text-match>
+</C:prop-filter>
+</C:comp-filter>
+</C:comp-filter>
+</C:filter>
+</C:calendar-query>
Added: CalDAVTester/trunk/Resource/nonascii/9.xml
===================================================================
--- CalDAVTester/trunk/Resource/nonascii/9.xml (rev 0)
+++ CalDAVTester/trunk/Resource/nonascii/9.xml 2007-06-20 21:02:35 UTC (rev 1612)
@@ -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/>
+</D:prop>
+<C:filter>
+<C:comp-filter name="VCALENDAR">
+<C:comp-filter name="VEVENT">
+<C:prop-filter name="SUMMARY">
+<C:text-match>té</C:text-match>
+</C:prop-filter>
+</C:comp-filter>
+</C:comp-filter>
+</C:filter>
+</C:calendar-query>
Added: CalDAVTester/trunk/scripts/tests/nonascii.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/nonascii.xml (rev 0)
+++ CalDAVTester/trunk/scripts/tests/nonascii.xml 2007-06-20 21:02:35 UTC (rev 1612)
@@ -0,0 +1,381 @@
+<?xml version="1.0" standalone="no"?>
+
+<!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
+
+<!--
+ Copyright (c) 2006-2007 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.
+
+ DRI: Cyrus Daboo, cdaboo at apple.com
+ -->
+
+<caldavtest>
+ <description>Test use of UTF-8 for HTTP and calendar data</description>
+
+ <start/>
+
+ <test-suite name='MKCALENDAR' ignore="yes">
+ <test name='1'>
+ <description>MKCALENDAR with non-ascii</description>
+ <request end-delete="yes">
+ <method>MKCALENDAR</method>
+ <ruri>$pathprefix:/Te%cc%81st/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>MKCALENDAR with non-ascii - duplicate</description>
+ <request>
+ <method>MKCALENDAR</method>
+ <ruri>$pathprefix:/T%c3%a9st/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>403</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>GET with non-ascii</description>
+ <request>
+ <method>GET</method>
+ <ruri>$pathprefix:/Te%cc%81st/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>GET with non-ascii</description>
+ <request>
+ <method>GET</method>
+ <ruri>$pathprefix:/T%c3%a9st/</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Non-ascii resource URI' ignore="yes">
+ <test name='1'>
+ <description>PUT with non-ascii</description>
+ <request end-delete="yes">
+ <method>PUT</method>
+ <ruri>$pathprefix:/Te%cc%81st/te%cc%81st.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/1.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>PUT with non-ascii</description>
+ <request end-delete="yes">
+ <method>PUT</method>
+ <ruri>$pathprefix:/Te%cc%81st/t%c3%a9st.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/1.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ <arg>
+ <name>status</name>
+ <value>403</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>GET with non-ascii</description>
+ <request>
+ <method>GET</method>
+ <ruri>$pathprefix:/Te%cc%81st/te%cc%81st.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>GET with non-ascii</description>
+ <request>
+ <method>GET</method>
+ <ruri>$pathprefix:/Te%cc%81st/t%c3%a9st.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='5'>
+ <description>DELETE with non-ascii</description>
+ <request>
+ <method>DELETE</method>
+ <ruri>$pathprefix:/Te%cc%81st/t%c3%a9st.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Multiget on-ascii resource URI' ignore="yes">
+ <test name='1'>
+ <description>PUT with non-ascii</description>
+ <request end-delete="yes">
+ <method>PUT</method>
+ <ruri>$pathprefix:/Te%cc%81st/te%cc%81st.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/1.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>REPORT with non-ascii - match parent and child</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$pathprefix:/Te%cc%81st/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>te%cc%81st.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>REPORT with non-ascii - match parent, different child</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$pathprefix:/Te%cc%81st/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>t%c3%a9st.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>REPORT with non-ascii - different parent, match child</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$pathprefix:/Te%cc%81st/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>te%cc%81st.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5'>
+ <description>REPORT with non-ascii - different parent, different child</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$pathprefix:/Te%cc%81st/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>t%c3%a9st.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6'>
+ <description>REPORT with non-ascii - match parent, match child</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$pathprefix:/T%c3%a9st/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/2.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>te%cc%81st.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='7'>
+ <description>REPORT with non-ascii - match parent, different child</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$pathprefix:/T%c3%a9st/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/3.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>t%c3%a9st.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='8'>
+ <description>REPORT with non-ascii - different parent, match child</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$pathprefix:/T%c3%a9st/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/4.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>te%cc%81st.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='9'>
+ <description>REPORT with non-ascii - different parent, different child</description>
+ <request>
+ <method>REPORT</method>
+ <ruri>$pathprefix:/T%c3%a9st/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/5.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>t%c3%a9st.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
+ <test-suite name='Non-ascii calendar data' ignore="no">
+ <test name='1'>
+ <description>PUT with non-ascii data</description>
+ <request end-delete="yes">
+ <method>PUT</method>
+ <ruri>nonascii.ics</ruri>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/6.ics</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2'>
+ <description>GET with non-ascii data</description>
+ <request>
+ <method>GET</method>
+ <ruri>nonascii.ics</ruri>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='3'>
+ <description>Basic query with non-ascii data</description>
+ <request>
+ <method>REPORT</method>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/7.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>nonascii.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4'>
+ <description>Text query with ascii data</description>
+ <request>
+ <method>REPORT</method>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/8.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>nonascii.ics</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='5'>
+ <description>Text query with non-ascii data</description>
+ <request>
+ <method>REPORT</method>
+ <data>
+ <content-type>text/calendar; charset=utf-8</content-type>
+ <filepath>Resource/nonascii/9.xml</filepath>
+ </data>
+ <verify>
+ <callback>multistatusItems</callback>
+ <arg>
+ <name>okhrefs</name>
+ <value>nonascii.ics</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/20070620/34cc9cd3/attachment.html
More information about the calendarserver-changes
mailing list