mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-03-13 08:00:15 +00:00
Add tests for AWLs "Fix GetProperties: Select properties with group prefix"
This commit is contained in:
parent
56dc373a71
commit
fd35aacb85
@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:VC="urn:ietf:params:xml:ns:carddav">
|
||||
<response>
|
||||
<href>/caldav.php/user5/addresses/sabre-vobject-131cdf91-5460-423b-a836-e420e5affe13.vcf</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<getetag>some valid etag</getetag>
|
||||
<VC:address-data>BEGIN:VCARD
|
||||
VERSION:4.0
|
||||
PRODID:-//Sabre//Sabre VObject 4.3.3//EN
|
||||
UID:sabre-vobject-131cdf91-5460-423b-a836-e420e5affe13
|
||||
FN:CardDavClient Test212420682
|
||||
N:Test212420682;CardDavClient;;;
|
||||
NICKNAME:Jonny0
|
||||
EMAIL;TYPE=HOME:john6doe@example.com
|
||||
EMAIL;TYPE=WORK:doe6@example.com
|
||||
X-CUSTOMPROP;X-CUSTOMPARAM=WORK:foobar
|
||||
REV:date
|
||||
END:VCARD
|
||||
</VC:address-data>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user5/addresses/sabre-vobject-8121cd7a-8251-4b74-a952-ca91fdc21e36.vcf</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<getetag>some valid etag</getetag>
|
||||
<VC:address-data>BEGIN:VCARD
|
||||
VERSION:4.0
|
||||
PRODID:-//Sabre//Sabre VObject 4.3.3//EN
|
||||
UID:sabre-vobject-8121cd7a-8251-4b74-a952-ca91fdc21e36
|
||||
FN:CardDavClient Test913043917
|
||||
N:Test913043917;CardDavClient;;;
|
||||
NICKNAME:Jonny1
|
||||
EMAIL:maxmu@abcd.com
|
||||
X-CUSTOMPROP;X-CUSTOMPARAM=HOME,WORK:foobar
|
||||
REV:date
|
||||
END:VCARD
|
||||
</VC:address-data>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
</response>
|
||||
<response>
|
||||
<href>/caldav.php/user5/addresses/sabre-vobject-41956788-1273-449e-bfb7-716850c91ec6.vcf</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<getetag>some valid etag</getetag>
|
||||
<VC:address-data>BEGIN:VCARD
|
||||
VERSION:4.0
|
||||
PRODID:-//Sabre//Sabre VObject 4.3.3//EN
|
||||
UID:sabre-vobject-41956788-1273-449e-bfb7-716850c91ec6
|
||||
FN:CardDavClient Test879489908
|
||||
N:Test879489908;CardDavClient;;;
|
||||
NICKNAME:Jonny2
|
||||
TEL;TYPE=HOME:12345
|
||||
TEL:555
|
||||
REV:date
|
||||
END:VCARD
|
||||
</VC:address-data>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
@ -0,0 +1,32 @@
|
||||
#
|
||||
# Test for non-existence of a grouped property (case-insensitive)
|
||||
#
|
||||
# (Jonny3 has item1.EMAIL set)
|
||||
#
|
||||
TYPE=REPORT
|
||||
URL=http://regression.host/caldav.php/user5/addresses/
|
||||
|
||||
HEADER=Accept: text/xml,application/xml
|
||||
HEADER=Content-Type: text/xml
|
||||
HEADER=Depth: 1
|
||||
|
||||
AUTH=user5:user5
|
||||
|
||||
# HEAD
|
||||
|
||||
BEGINDATA
|
||||
<CARDDAV:addressbook-query xmlns:DAV="DAV:" xmlns:CARDDAV="urn:ietf:params:xml:ns:carddav" xmlns:CS="http://calendarserver.org/ns/">
|
||||
<DAV:prop>
|
||||
<DAV:getetag/>
|
||||
<CARDDAV:address-data/>
|
||||
</DAV:prop>
|
||||
<CARDDAV:filter test="anyof">
|
||||
<CARDDAV:prop-filter name="item1.EMAIL" test="anyof">
|
||||
<CARDDAV:is-not-defined/>
|
||||
</CARDDAV:prop-filter>
|
||||
</CARDDAV:filter>
|
||||
</CARDDAV:addressbook-query>
|
||||
ENDDATA
|
||||
|
||||
REPLACE=_<getetag>"[0-9a-f]+"</getetag>_<getetag>some valid etag</getetag>_
|
||||
REPLACE=/^REV:.*$/REV:date/
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:VC="urn:ietf:params:xml:ns:carddav">
|
||||
<response>
|
||||
<href>/caldav.php/user5/addresses/sabre-vobject-34cd55a8-330f-47cd-8b69-6fbd16a0880b.vcf</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<getetag>some valid etag</getetag>
|
||||
<VC:address-data>BEGIN:VCARD
|
||||
VERSION:4.0
|
||||
PRODID:-//Sabre//Sabre VObject 4.3.3//EN
|
||||
UID:sabre-vobject-34cd55a8-330f-47cd-8b69-6fbd16a0880b
|
||||
FN:CardDavClient Test1520108081
|
||||
N:Test1520108081;CardDavClient;;;
|
||||
NICKNAME:Jonny3
|
||||
ITEM1.EMAIL:foo@ex.com
|
||||
ITEM1.X-ABLABEL:CustomLabel
|
||||
IMPP;X-SERVICE-TYPE=Jabber;TYPE=HOME:xmpp:foo@example.com
|
||||
REV:date
|
||||
END:VCARD
|
||||
</VC:address-data>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
@ -0,0 +1,30 @@
|
||||
#
|
||||
# Request a report for a grouped property (inverse of 2055)
|
||||
#
|
||||
# (only Jonny3 has item1.EMAIL set)
|
||||
#
|
||||
TYPE=REPORT
|
||||
URL=http://regression.host/caldav.php/user5/addresses/
|
||||
|
||||
HEADER=Accept: text/xml,application/xml
|
||||
HEADER=Content-Type: text/xml
|
||||
HEADER=Depth: 1
|
||||
|
||||
AUTH=user5:user5
|
||||
|
||||
# HEAD
|
||||
|
||||
BEGINDATA
|
||||
<CARDDAV:addressbook-query xmlns:DAV="DAV:" xmlns:CARDDAV="urn:ietf:params:xml:ns:carddav" xmlns:CS="http://calendarserver.org/ns/">
|
||||
<DAV:prop>
|
||||
<DAV:getetag/>
|
||||
<CARDDAV:address-data/>
|
||||
</DAV:prop>
|
||||
<CARDDAV:filter test="anyof">
|
||||
<CARDDAV:prop-filter name="item1.EMAIL" test="anyof"/>
|
||||
</CARDDAV:filter>
|
||||
</CARDDAV:addressbook-query>
|
||||
ENDDATA
|
||||
|
||||
REPLACE=_<getetag>"[0-9a-f]+"</getetag>_<getetag>some valid etag</getetag>_
|
||||
REPLACE=/^REV:.*$/REV:date/
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:VC="urn:ietf:params:xml:ns:carddav">
|
||||
<response>
|
||||
<href>/caldav.php/user5/addresses/sabre-vobject-34cd55a8-330f-47cd-8b69-6fbd16a0880b.vcf</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<getetag>some valid etag</getetag>
|
||||
<VC:address-data>BEGIN:VCARD
|
||||
VERSION:4.0
|
||||
PRODID:-//Sabre//Sabre VObject 4.3.3//EN
|
||||
UID:sabre-vobject-34cd55a8-330f-47cd-8b69-6fbd16a0880b
|
||||
FN:CardDavClient Test1520108081
|
||||
N:Test1520108081;CardDavClient;;;
|
||||
NICKNAME:Jonny3
|
||||
ITEM1.EMAIL:foo@ex.com
|
||||
ITEM1.X-ABLABEL:CustomLabel
|
||||
IMPP;X-SERVICE-TYPE=Jabber;TYPE=HOME:xmpp:foo@example.com
|
||||
REV:date
|
||||
END:VCARD
|
||||
</VC:address-data>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
@ -0,0 +1,33 @@
|
||||
#
|
||||
# Request a report for a text-match on a grouped property
|
||||
#
|
||||
# (only Jonny3 has item1.EMAIL set or a matching address)
|
||||
#
|
||||
TYPE=REPORT
|
||||
URL=http://regression.host/caldav.php/user5/addresses/
|
||||
|
||||
HEADER=Accept: text/xml,application/xml
|
||||
HEADER=Content-Type: text/xml
|
||||
HEADER=Depth: 1
|
||||
|
||||
AUTH=user5:user5
|
||||
|
||||
# HEAD
|
||||
|
||||
BEGINDATA
|
||||
<?xml version="1.0"?>
|
||||
<CARDDAV:addressbook-query xmlns:DAV="DAV:" xmlns:CARDDAV="urn:ietf:params:xml:ns:carddav" xmlns:CS="http://calendarserver.org/ns/">
|
||||
<DAV:prop>
|
||||
<DAV:getetag/>
|
||||
<CARDDAV:address-data/>
|
||||
</DAV:prop>
|
||||
<CARDDAV:filter test="anyof">
|
||||
<CARDDAV:prop-filter name="item1.EMAIL" test="anyof">
|
||||
<CARDDAV:text-match negate-condition="no" collation="i;unicode-casemap" match-type="equals">foo@ex.com</CARDDAV:text-match>
|
||||
</CARDDAV:prop-filter>
|
||||
</CARDDAV:filter>
|
||||
</CARDDAV:addressbook-query>
|
||||
ENDDATA
|
||||
|
||||
REPLACE=_<getetag>"[0-9a-f]+"</getetag>_<getetag>some valid etag</getetag>_
|
||||
REPLACE=/^REV:.*$/REV:date/
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:VC="urn:ietf:params:xml:ns:carddav">
|
||||
<response>
|
||||
<href>/caldav.php/user5/addresses/sabre-vobject-34cd55a8-330f-47cd-8b69-6fbd16a0880b.vcf</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<getetag>some valid etag</getetag>
|
||||
<VC:address-data>BEGIN:VCARD
|
||||
VERSION:4.0
|
||||
PRODID:-//Sabre//Sabre VObject 4.3.3//EN
|
||||
UID:sabre-vobject-34cd55a8-330f-47cd-8b69-6fbd16a0880b
|
||||
FN:CardDavClient Test1520108081
|
||||
N:Test1520108081;CardDavClient;;;
|
||||
NICKNAME:Jonny3
|
||||
ITEM1.EMAIL:foo@ex.com
|
||||
ITEM1.X-ABLABEL:CustomLabel
|
||||
IMPP;X-SERVICE-TYPE=Jabber;TYPE=HOME:xmpp:foo@example.com
|
||||
REV:date
|
||||
END:VCARD
|
||||
</VC:address-data>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
@ -0,0 +1,34 @@
|
||||
#
|
||||
# Request a report for a text-match on a grouped property
|
||||
#
|
||||
# (only Jonny3 has item1.EMAIL set, but the text-match alone might also find
|
||||
# Jonny0)
|
||||
#
|
||||
TYPE=REPORT
|
||||
URL=http://regression.host/caldav.php/user5/addresses/
|
||||
|
||||
HEADER=Accept: text/xml,application/xml
|
||||
HEADER=Content-Type: text/xml
|
||||
HEADER=Depth: 1
|
||||
|
||||
AUTH=user5:user5
|
||||
|
||||
# HEAD
|
||||
|
||||
BEGINDATA
|
||||
<?xml version="1.0"?>
|
||||
<CARDDAV:addressbook-query xmlns:DAV="DAV:" xmlns:CARDDAV="urn:ietf:params:xml:ns:carddav" xmlns:CS="http://calendarserver.org/ns/">
|
||||
<DAV:prop>
|
||||
<DAV:getetag/>
|
||||
<CARDDAV:address-data/>
|
||||
</DAV:prop>
|
||||
<CARDDAV:filter test="anyof">
|
||||
<CARDDAV:prop-filter name="item1.EMAIL" test="anyof">
|
||||
<CARDDAV:text-match negate-condition="no" collation="i;unicode-casemap" match-type="contains">@ex</CARDDAV:text-match>
|
||||
</CARDDAV:prop-filter>
|
||||
</CARDDAV:filter>
|
||||
</CARDDAV:addressbook-query>
|
||||
ENDDATA
|
||||
|
||||
REPLACE=_<getetag>"[0-9a-f]+"</getetag>_<getetag>some valid etag</getetag>_
|
||||
REPLACE=/^REV:.*$/REV:date/
|
||||
Loading…
x
Reference in New Issue
Block a user