summaryrefslogtreecommitdiff
path: root/test_files/more_tests.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test_files/more_tests.txt')
-rw-r--r--test_files/more_tests.txt28
1 files changed, 25 insertions, 3 deletions
diff --git a/test_files/more_tests.txt b/test_files/more_tests.txt
index 8f4ec9a..a19cac1 100644
--- a/test_files/more_tests.txt
+++ b/test_files/more_tests.txt
@@ -19,17 +19,31 @@ FN:Helloሴ World!
N:World;Helloሴ;;;
END:VCARD
-Unicode in TZID
+Helper function
...............
-
>>> from pkg_resources import resource_stream
->>> f = resource_stream(__name__, 'test_files/tzid_8bit.ics')
+>>> def get_stream(path):
+... try:
+... return resource_stream(__name__, 'test_files/' + path)
+... except: # different paths, depending on whether doctest is run directly
+... return resource_stream(__name__, path)
+
+Unicode in TZID
+...............
+>>> f = get_stream("tzid_8bit.ics")
>>> cal = vobject.readOne(f)
>>> print cal.vevent.dtstart.value
2008-05-30 15:00:00+06:00
>>> print cal.vevent.dtstart.serialize()
DTSTART;TZID=Екатеринбург:20080530T150000
+Commas in TZID
+..............
+>>> f = get_stream("ms_tzid.ics")
+>>> cal = vobject.readOne(f)
+>>> print cal.vevent.dtstart.value
+2008-05-30 15:00:00+10:00
+
Equality in vCards
..................
@@ -45,6 +59,14 @@ Organization (org)
>>> print card.org.serialize()
ORG:Company\, Inc.;main unit;sub-unit
+Ruby escapes semi-colons in rrules
+..................................
+
+>>> f = get_stream("ruby_rrule.ics")
+>>> cal = vobject.readOne(f)
+>>> iter(cal.vevent.rruleset).next()
+datetime.datetime(2003, 1, 1, 7, 0)
+
quoted-printable
................