aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-05-24 02:25:03 +0000
committerGlenn Morris2008-05-24 02:25:03 +0000
commita4766629f8575363ec072cfc97b0004027bef0ff (patch)
treee4f2b017dc9d20451411e4a4091bb7b6fd213408
parent64e5a32f1997d780862f9262f67e3246313303de (diff)
downloademacs-a4766629f8575363ec072cfc97b0004027bef0ff.tar.gz
emacs-a4766629f8575363ec072cfc97b0004027bef0ff.zip
Ulf Jasper <ulf.jasper at web.de>
(icalendar-testsuite--run-function-tests): Add icalendar-testsuite--test-datestring-to-isodate, icalendar-testsuite--test-datetime-to-diary-date, and icalendar-testsuite--test-calendar-style. (icalendar-testsuite--test-format-ical-event): (icalendar-testsuite--test-parse-summary-and-rest): Doc fix. Remove european-calendar-style. (icalendar-testsuite--get-ical-event): Doc fix. (icalendar-testsuite--test-first-weekday-of-year): (icalendar-testsuite--run-cycle-tests): Add doc string. (icalendar-testsuite--test-datestring-to-isodate): (icalendar-testsuite--test-datetime-to-diary-date): (icalendar-testsuite--test-calendar-style): New functions. (icalendar-testsuite--test-export): Handle iso date style. New arg INPUT-ISO. Use calendar-date-style. (icalendar-testsuite--test-import): Handle iso date style. New arg EXPECTED-ISO. Use calendar-date-style. (icalendar-testsuite--test-cycle): Handle iso date style. (icalendar-testsuite--run-import-tests): (icalendar-testsuite--run-export-tests): (icalendar-testsuite--run-real-world-tests): Add iso style tests.
-rw-r--r--test/ChangeLog24
-rw-r--r--test/icalendar-testsuite.el215
2 files changed, 205 insertions, 34 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 0502bb3fe3f..8c1995da76c 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,27 @@
12008-05-24 Ulf Jasper <ulf.jasper@web.de>
2
3 * icalendar-testsuite.el (icalendar-testsuite--run-function-tests):
4 Add icalendar-testsuite--test-datestring-to-isodate,
5 icalendar-testsuite--test-datetime-to-diary-date, and
6 icalendar-testsuite--test-calendar-style.
7 (icalendar-testsuite--test-format-ical-event):
8 (icalendar-testsuite--test-parse-summary-and-rest):
9 Doc fix. Remove european-calendar-style.
10 (icalendar-testsuite--get-ical-event): Doc fix.
11 (icalendar-testsuite--test-first-weekday-of-year):
12 (icalendar-testsuite--run-cycle-tests): Add doc string.
13 (icalendar-testsuite--test-datestring-to-isodate):
14 (icalendar-testsuite--test-datetime-to-diary-date):
15 (icalendar-testsuite--test-calendar-style): New functions.
16 (icalendar-testsuite--test-export): Handle iso date style.
17 New arg INPUT-ISO. Use calendar-date-style.
18 (icalendar-testsuite--test-import): Handle iso date style.
19 New arg EXPECTED-ISO. Use calendar-date-style.
20 (icalendar-testsuite--test-cycle): Handle iso date style.
21 (icalendar-testsuite--run-import-tests):
22 (icalendar-testsuite--run-export-tests):
23 (icalendar-testsuite--run-real-world-tests): Add iso style tests.
24
12008-02-29 Glenn Morris <rgm@gnu.org> 252008-02-29 Glenn Morris <rgm@gnu.org>
2 26
3 * README: New file. 27 * README: New file.
diff --git a/test/icalendar-testsuite.el b/test/icalendar-testsuite.el
index 17340ad745a..fcfef918ad6 100644
--- a/test/icalendar-testsuite.el
+++ b/test/icalendar-testsuite.el
@@ -27,6 +27,8 @@
27;; TODO: 27;; TODO:
28;; - Add more unit tests for functions, timezone etc. 28;; - Add more unit tests for functions, timezone etc.
29 29
30;; Note: Watch the trailing blank that is added on import.
31
30;;; Code: 32;;; Code:
31(defun icalendar-testsuite-run () 33(defun icalendar-testsuite-run ()
32 "Run icalendar test suite." 34 "Run icalendar test suite."
@@ -46,10 +48,13 @@
46 (icalendar-testsuite--test-parse-summary-and-rest) 48 (icalendar-testsuite--test-parse-summary-and-rest)
47 (icalendar-testsuite--test-format-ical-event) 49 (icalendar-testsuite--test-format-ical-event)
48 (icalendar-testsuite--test-import-format-sample) 50 (icalendar-testsuite--test-import-format-sample)
49 (icalendar-testsuite--test-first-weekday-of-year)) 51 (icalendar-testsuite--test-first-weekday-of-year)
52 (icalendar-testsuite--test-datestring-to-isodate)
53 (icalendar-testsuite--test-datetime-to-diary-date)
54 (icalendar-testsuite--test-calendar-style))
50 55
51(defun icalendar-testsuite--test-format-ical-event () 56(defun icalendar-testsuite--test-format-ical-event ()
52 "Test icalendar--format-ical-event" 57 "Test `icalendar--format-ical-event'."
53 (let ((icalendar-import-format "%s%d%l%o%t%u%c") 58 (let ((icalendar-import-format "%s%d%l%o%t%u%c")
54 (icalendar-import-format-summary "SUM %s") 59 (icalendar-import-format-summary "SUM %s")
55 (icalendar-import-format-location " LOC %s") 60 (icalendar-import-format-location " LOC %s")
@@ -58,7 +63,6 @@
58 (icalendar-import-format-status " STA %s") 63 (icalendar-import-format-status " STA %s")
59 (icalendar-import-format-url " URL %s") 64 (icalendar-import-format-url " URL %s")
60 (icalendar-import-format-class " CLA %s") 65 (icalendar-import-format-class " CLA %s")
61 (was-european-calendar european-calendar-style)
62 (event (icalendar-testsuite--get-ical-event "BEGIN:VEVENT 66 (event (icalendar-testsuite--get-ical-event "BEGIN:VEVENT
63DTSTAMP:20030509T043439Z 67DTSTAMP:20030509T043439Z
64DTSTART:20030509T103000 68DTSTART:20030509T103000
@@ -89,7 +93,7 @@ END:VEVENT
89 "-sum-des-loc-org-nil-nil-nil-") t))) 93 "-sum-des-loc-org-nil-nil-nil-") t)))
90 94
91(defun icalendar-testsuite--test-parse-summary-and-rest () 95(defun icalendar-testsuite--test-parse-summary-and-rest ()
92 "Test icalendar--parse-summary-and-rest." 96 "Test `icalendar--parse-summary-and-rest'."
93 (let ((icalendar-import-format "%s%d%l%o%t%u%c") 97 (let ((icalendar-import-format "%s%d%l%o%t%u%c")
94 (icalendar-import-format-summary "SUM %s") 98 (icalendar-import-format-summary "SUM %s")
95 (icalendar-import-format-location " LOC %s") 99 (icalendar-import-format-location " LOC %s")
@@ -98,7 +102,6 @@ END:VEVENT
98 (icalendar-import-format-status " STA %s") 102 (icalendar-import-format-status " STA %s")
99 (icalendar-import-format-url " URL %s") 103 (icalendar-import-format-url " URL %s")
100 (icalendar-import-format-class " CLA %s") 104 (icalendar-import-format-class " CLA %s")
101 (was-european-calendar european-calendar-style)
102 (result)) 105 (result))
103 ;; FIXME: need a trailing blank char! 106 ;; FIXME: need a trailing blank char!
104 (setq result (icalendar--parse-summary-and-rest "SUM sum ORG org ")) 107 (setq result (icalendar--parse-summary-and-rest "SUM sum ORG org "))
@@ -119,7 +122,8 @@ END:VEVENT
119 )) 122 ))
120 123
121(defun icalendar-testsuite--get-ical-event (ical-string) 124(defun icalendar-testsuite--get-ical-event (ical-string)
122 "Helper function for testing `icalendar-testsuite--test-format-ical-event'." 125 "Helper function for testing `icalendar-testsuite--test-format-ical-event'.
126Return icalendar event for ICAL-STRING."
123 (save-excursion 127 (save-excursion
124 (with-temp-buffer 128 (with-temp-buffer
125 (insert ical-string) 129 (insert ical-string)
@@ -143,6 +147,7 @@ END:VEVENT
143 "ORGANIZER=`d' STATUS=`' URL=`' CLASS=`'")))) 147 "ORGANIZER=`d' STATUS=`' URL=`' CLASS=`'"))))
144 148
145(defun icalendar-testsuite--test-first-weekday-of-year () 149(defun icalendar-testsuite--test-first-weekday-of-year ()
150 "Test method for `icalendar-first-weekday-of-year'."
146 (assert (eq 1 (icalendar-first-weekday-of-year "TU" 2008))) 151 (assert (eq 1 (icalendar-first-weekday-of-year "TU" 2008)))
147 (assert (eq 3 (icalendar-first-weekday-of-year "WE" 2007))) 152 (assert (eq 3 (icalendar-first-weekday-of-year "WE" 2007)))
148 (assert (eq 5 (icalendar-first-weekday-of-year "TH" 2006))) 153 (assert (eq 5 (icalendar-first-weekday-of-year "TH" 2006)))
@@ -153,20 +158,96 @@ END:VEVENT
153 (assert (eq 3 (icalendar-first-weekday-of-year "MO" 2000))) 158 (assert (eq 3 (icalendar-first-weekday-of-year "MO" 2000)))
154 (assert (eq 1 (icalendar-first-weekday-of-year "TH" 1970)))) 159 (assert (eq 1 (icalendar-first-weekday-of-year "TH" 1970))))
155 160
161(defun icalendar-testsuite--test-datestring-to-isodate ()
162 "Test method for `icalendar--datestring-to-isodate'."
163 (let ((calendar-date-style 'iso))
164 ;; numeric iso
165 (assert (string= (icalendar--datestring-to-isodate "2008 05 11")
166 "20080511"))
167 (assert (string= (icalendar--datestring-to-isodate "2008 05 31")
168 "20080531"))
169 (assert (string= (icalendar--datestring-to-isodate "2008 05 31" 2)
170 "20080602"))
171
172 ;; numeric european
173 (setq calendar-date-style 'european)
174 (assert (string= (icalendar--datestring-to-isodate "11 05 2008")
175 "20080511"))
176 (assert (string= (icalendar--datestring-to-isodate "31 05 2008")
177 "20080531"))
178 (assert (string= (icalendar--datestring-to-isodate "31 05 2008" 2)
179 "20080602"))
180
181 ;; numeric american
182 (setq calendar-date-style 'american)
183 (assert (string= (icalendar--datestring-to-isodate "11 05 2008")
184 "20081105"))
185 (assert (string= (icalendar--datestring-to-isodate "12 30 2008")
186 "20081230"))
187 (assert (string= (icalendar--datestring-to-isodate "12 30 2008" 2)
188 "20090101"))
189
190 ;; non-numeric
191 (setq calendar-date-style nil) ;not necessary for conversion
192 (assert (string= (icalendar--datestring-to-isodate "Nov 05 2008")
193 "20081105"))
194 (assert (string= (icalendar--datestring-to-isodate "05 Nov 2008")
195 "20081105"))
196 (assert (string= (icalendar--datestring-to-isodate "2008 Nov 05")
197 "20081105"))))
198
199(defun icalendar-testsuite--test-datetime-to-diary-date ()
200 "Test method for `icalendar--datetime-to-diary-date'."
201 (let* ((datetime '(59 59 23 31 12 2008))
202 (calendar-date-style 'iso))
203 (assert (string= (icalendar--datetime-to-diary-date datetime)
204 "2008 12 31"))
205 (setq calendar-date-style 'european)
206 (assert (string= (icalendar--datetime-to-diary-date datetime)
207 "31 12 2008"))
208 (setq calendar-date-style 'american)
209 (assert (string= (icalendar--datetime-to-diary-date datetime)
210 "12 31 2008"))))
211
212(defun icalendar-testsuite--test-calendar-style ()
213 "Test method for `icalendar--date-style'."
214 (dolist (calendar-date-style '(iso american european))
215 (assert (eq (icalendar--date-style) calendar-date-style)))
216 (let ((cds calendar-date-style)
217 (european-calendar-style t))
218 (makunbound 'calendar-date-style)
219 (assert (eq (icalendar--date-style) 'european))
220 (with-no-warnings (setq european-calendar-style nil)) ;still get warning!?! FIXME
221 (assert (eq (icalendar--date-style) 'american))
222 (setq calendar-date-style cds)))
223
156;; ====================================================================== 224;; ======================================================================
157;; Test methods for exporting from diary to icalendar 225;; Test methods for exporting from diary to icalendar
158;; ====================================================================== 226;; ======================================================================
159 227
160(defun icalendar-testsuite--test-export (input-european input-american 228(defun icalendar-testsuite--test-export (input-iso input-european input-american
161 expected-output) 229 expected-output)
162 "Perform an export test. 230 "Perform an export test.
231Argument INPUT-ISO iso style diary string.
163Argument INPUT-EUROPEAN european style diary string. 232Argument INPUT-EUROPEAN european style diary string.
164Argument INPUT-AMERICAN american style diary string. 233Argument INPUT-AMERICAN american style diary string.
165Argument EXPECTED-OUTPUT expected icalendar result string." 234Argument EXPECTED-OUTPUT expected icalendar result string.
235
236European style input data must use german month names. American
237and ISO style input data must use english month names."
166 (message "--- icalendar-testsuite--test-export ---") 238 (message "--- icalendar-testsuite--test-export ---")
167 (let ((was-european-calendar european-calendar-style) 239 (let ((calendar-date-style 'iso)
168 (icalendar-recurring-start-year 2000)) 240 (icalendar-recurring-start-year 2000))
169 (set-time-zone-rule "CET") ;;FIXME: reset timezone! 241 (set-time-zone-rule "CET") ;;FIXME: reset timezone!
242 (when input-iso
243 (let ((calendar-month-name-array
244 ["January" "February" "March" "April" "May" "June" "July" "August"
245 "September" "October" "November" "December"])
246 (calendar-day-name-array
247 ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday"
248 "Saturday"]))
249 (setq calendar-date-style 'iso)
250 (icalendar-testsuite--do-test-export input-iso expected-output)))
170 (when input-european 251 (when input-european
171 (let ((calendar-month-name-array 252 (let ((calendar-month-name-array
172 ["Januar" "Februar" "März" "April" "Mai" "Juni" "Juli" "August" 253 ["Januar" "Februar" "März" "April" "Mai" "Juni" "Juli" "August"
@@ -174,7 +255,7 @@ Argument EXPECTED-OUTPUT expected icalendar result string."
174 (calendar-day-name-array 255 (calendar-day-name-array
175 ["Sonntag" "Montag" "Dienstag" "Mittwoch" "Donnerstag" "Freitag" 256 ["Sonntag" "Montag" "Dienstag" "Mittwoch" "Donnerstag" "Freitag"
176 "Samstag"])) 257 "Samstag"]))
177 (european-calendar) 258 (setq calendar-date-style 'european)
178 (icalendar-testsuite--do-test-export input-european expected-output))) 259 (icalendar-testsuite--do-test-export input-european expected-output)))
179 (when input-american 260 (when input-american
180 (let ((calendar-month-name-array 261 (let ((calendar-month-name-array
@@ -183,11 +264,8 @@ Argument EXPECTED-OUTPUT expected icalendar result string."
183 (calendar-day-name-array 264 (calendar-day-name-array
184 ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" 265 ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday"
185 "Saturday"])) 266 "Saturday"]))
186 (american-calendar) 267 (setq calendar-date-style 'american)
187 (icalendar-testsuite--do-test-export input-american expected-output))) 268 (icalendar-testsuite--do-test-export input-american expected-output)))))
188 (if was-european-calendar
189 (european-calendar)
190 (american-calendar))))
191 269
192(defun icalendar-testsuite--do-test-export (input expected-output) 270(defun icalendar-testsuite--do-test-export (input expected-output)
193 "Actually perform export test. 271 "Actually perform export test.
@@ -239,10 +317,11 @@ END:VCALENDAR
239;; Test methods for importing from icalendar to diary 317;; Test methods for importing from icalendar to diary
240;; ====================================================================== 318;; ======================================================================
241 319
242(defun icalendar-testsuite--test-import (input expected-european 320(defun icalendar-testsuite--test-import (input expected-iso expected-european
243 expected-american) 321 expected-american)
244 "Perform import test. 322 "Perform import test.
245Argument INPUT icalendar event string. 323Argument INPUT icalendar event string.
324Argument EXPECTED-ISO expected iso style diary string.
246Argument EXPECTED-EUROPEAN expected european style diary string. 325Argument EXPECTED-EUROPEAN expected european style diary string.
247Argument EXPECTED-AMERICAN expected american style diary string." 326Argument EXPECTED-AMERICAN expected american style diary string."
248 (message "--- icalendar-testsuite--test-import ---") 327 (message "--- icalendar-testsuite--test-import ---")
@@ -265,16 +344,16 @@ Argument EXPECTED-AMERICAN expected american style diary string."
265 (icalendar-import-format-status "\n Status: %s") 344 (icalendar-import-format-status "\n Status: %s")
266 (icalendar-import-format-url "\n URL: %s") 345 (icalendar-import-format-url "\n URL: %s")
267 (icalendar-import-format-class "\n Class: %s") 346 (icalendar-import-format-class "\n Class: %s")
268 (was-european-calendar european-calendar-style)) 347 calendar-date-style)
348 (when expected-iso
349 (setq calendar-date-style 'iso)
350 (icalendar-testsuite--do-test-import input expected-iso))
269 (when expected-european 351 (when expected-european
270 (european-calendar) 352 (setq calendar-date-style 'european)
271 (icalendar-testsuite--do-test-import input expected-european)) 353 (icalendar-testsuite--do-test-import input expected-european))
272 (when expected-american 354 (when expected-american
273 (american-calendar) 355 (setq calendar-date-style 'american)
274 (icalendar-testsuite--do-test-import input expected-american)) 356 (icalendar-testsuite--do-test-import input expected-american))))
275 (if was-european-calendar
276 (european-calendar)
277 (american-calendar))))
278 (set-time-zone-rule timezone))) 357 (set-time-zone-rule timezone)))
279 358
280(defun icalendar-testsuite--do-test-import (input expected-output) 359(defun icalendar-testsuite--do-test-import (input expected-output)
@@ -315,15 +394,9 @@ Argument INPUT icalendar event string."
315 (icalendar-import-format-organizer "\n Organizer: %s") 394 (icalendar-import-format-organizer "\n Organizer: %s")
316 (icalendar-import-format-status "\n Status: %s") 395 (icalendar-import-format-status "\n Status: %s")
317 (icalendar-import-format-url "\n URL: %s") 396 (icalendar-import-format-url "\n URL: %s")
318 (icalendar-import-format-class "\n Class: %s") 397 (icalendar-import-format-class "\n Class: %s"))
319 (was-european-calendar european-calendar-style)) 398 (dolist (calendar-date-style '(iso european american))
320 (european-calendar) 399 (icalendar-testsuite--do-test-cycle)))))
321 (icalendar-testsuite--do-test-cycle)
322 (american-calendar)
323 (icalendar-testsuite--do-test-cycle)
324 (if was-european-calendar
325 (european-calendar)
326 (american-calendar)))))
327 400
328(defun icalendar-testsuite--do-test-cycle () 401(defun icalendar-testsuite--do-test-cycle ()
329 "Actually perform import/export cycle test." 402 "Actually perform import/export cycle test."
@@ -360,12 +433,14 @@ Argument INPUT icalendar event string."
360 "SUMMARY:non-recurring 433 "SUMMARY:non-recurring
361DTSTART;VALUE=DATE-TIME:20030919T090000 434DTSTART;VALUE=DATE-TIME:20030919T090000
362DTEND;VALUE=DATE-TIME:20030919T113000" 435DTEND;VALUE=DATE-TIME:20030919T113000"
436 "&2003/9/19 09:00-11:30 non-recurring"
363 "&19/9/2003 09:00-11:30 non-recurring" 437 "&19/9/2003 09:00-11:30 non-recurring"
364 "&9/19/2003 09:00-11:30 non-recurring") 438 "&9/19/2003 09:00-11:30 non-recurring")
365 439
366 (icalendar-testsuite--test-import 440 (icalendar-testsuite--test-import
367 "SUMMARY:non-recurring allday 441 "SUMMARY:non-recurring allday
368DTSTART;VALUE=DATE-TIME:20030919" 442DTSTART;VALUE=DATE-TIME:20030919"
443 "&2003/9/19 non-recurring allday"
369 "&19/9/2003 non-recurring allday" 444 "&19/9/2003 non-recurring allday"
370 "&9/19/2003 non-recurring allday") 445 "&9/19/2003 non-recurring allday")
371 446
@@ -373,6 +448,7 @@ DTSTART;VALUE=DATE-TIME:20030919"
373 "SUMMARY:long 448 "SUMMARY:long
374 summary 449 summary
375DTSTART;VALUE=DATE:20030919" 450DTSTART;VALUE=DATE:20030919"
451 "&2003/9/19 long summary"
376 "&19/9/2003 long summary" 452 "&19/9/2003 long summary"
377 "&9/19/2003 long summary") 453 "&9/19/2003 long summary")
378 454
@@ -387,8 +463,10 @@ DTSTART;VALUE=DATE:20040719
387DTEND;VALUE=DATE:20040828 463DTEND;VALUE=DATE:20040828
388DTSTAMP:20031103T011641Z 464DTSTAMP:20031103T011641Z
389" 465"
466 "&%%(and (diary-block 2004 7 19 2004 8 27)) Sommerferien"
390 "&%%(and (diary-block 19 7 2004 27 8 2004)) Sommerferien" 467 "&%%(and (diary-block 19 7 2004 27 8 2004)) Sommerferien"
391 "&%%(and (diary-block 7 19 2004 8 27 2004)) Sommerferien") 468 "&%%(and (diary-block 7 19 2004 8 27 2004)) Sommerferien")
469
392 (icalendar-testsuite--test-import 470 (icalendar-testsuite--test-import
393 "UID 471 "UID
394 :04979712-3902-11d9-93dd-8f9f4afe08da 472 :04979712-3902-11d9-93dd-8f9f4afe08da
@@ -409,6 +487,7 @@ DTSTAMP
409LAST-MODIFIED 487LAST-MODIFIED
410 :20041118T013640Z 488 :20041118T013640Z
411" 489"
490 "&2004/11/23 14:00-14:30 folded summary"
412 "&23/11/2004 14:00-14:30 folded summary" 491 "&23/11/2004 14:00-14:30 folded summary"
413 "&11/23/2004 14:00-14:30 folded summary") 492 "&11/23/2004 14:00-14:30 folded summary")
414 (icalendar-testsuite--test-import 493 (icalendar-testsuite--test-import
@@ -429,14 +508,17 @@ DTEND
429DTSTAMP 508DTSTAMP
430 :20041118T013641Z 509 :20041118T013641Z
431" 510"
511 "&2004/11/23 14:45-15:45 another example"
432 "&23/11/2004 14:45-15:45 another example" 512 "&23/11/2004 14:45-15:45 another example"
433 "&11/23/2004 14:45-15:45 another example") 513 "&11/23/2004 14:45-15:45 another example")
514
434 (icalendar-testsuite--test-import 515 (icalendar-testsuite--test-import
435 "SUMMARY:rrule daily 516 "SUMMARY:rrule daily
436DTSTART;VALUE=DATE-TIME:20030919T090000 517DTSTART;VALUE=DATE-TIME:20030919T090000
437DTEND;VALUE=DATE-TIME:20030919T113000 518DTEND;VALUE=DATE-TIME:20030919T113000
438RRULE:FREQ=DAILY; 519RRULE:FREQ=DAILY;
439" 520"
521 "&%%(and (diary-cyclic 1 2003 9 19)) 09:00-11:30 rrule daily"
440 "&%%(and (diary-cyclic 1 19 9 2003)) 09:00-11:30 rrule daily" 522 "&%%(and (diary-cyclic 1 19 9 2003)) 09:00-11:30 rrule daily"
441 "&%%(and (diary-cyclic 1 9 19 2003)) 09:00-11:30 rrule daily") 523 "&%%(and (diary-cyclic 1 9 19 2003)) 09:00-11:30 rrule daily")
442 524
@@ -447,6 +529,7 @@ DTSTART;VALUE=DATE-TIME:20030919T090000
447DTEND;VALUE=DATE-TIME:20030919T113000 529DTEND;VALUE=DATE-TIME:20030919T113000
448RRULE:FREQ=DAILY;INTERVAL=2 530RRULE:FREQ=DAILY;INTERVAL=2
449" 531"
532 "&%%(and (diary-cyclic 2 2003 9 19)) 09:00-11:30 rrule daily"
450 "&%%(and (diary-cyclic 2 19 9 2003)) 09:00-11:30 rrule daily" 533 "&%%(and (diary-cyclic 2 19 9 2003)) 09:00-11:30 rrule daily"
451 "&%%(and (diary-cyclic 2 9 19 2003)) 09:00-11:30 rrule daily") 534 "&%%(and (diary-cyclic 2 9 19 2003)) 09:00-11:30 rrule daily")
452 (icalendar-testsuite--test-import 535 (icalendar-testsuite--test-import
@@ -456,14 +539,17 @@ DTEND;VALUE=DATE-TIME:20030919T113000
456RRULE:FREQ=DAILY;INTERVAL=2 539RRULE:FREQ=DAILY;INTERVAL=2
457EXDATE:20030921,20030925 540EXDATE:20030921,20030925
458" 541"
542 "&%%(and (not (diary-date 2003 9 25)) (not (diary-date 2003 9 21)) (diary-cyclic 2 2003 9 19)) 09:00-11:30 rrule daily with exceptions"
459 "&%%(and (not (diary-date 25 9 2003)) (not (diary-date 21 9 2003)) (diary-cyclic 2 19 9 2003)) 09:00-11:30 rrule daily with exceptions" 543 "&%%(and (not (diary-date 25 9 2003)) (not (diary-date 21 9 2003)) (diary-cyclic 2 19 9 2003)) 09:00-11:30 rrule daily with exceptions"
460 "&%%(and (not (diary-date 9 25 2003)) (not (diary-date 9 21 2003)) (diary-cyclic 2 9 19 2003)) 09:00-11:30 rrule daily with exceptions") 544 "&%%(and (not (diary-date 9 25 2003)) (not (diary-date 9 21 2003)) (diary-cyclic 2 9 19 2003)) 09:00-11:30 rrule daily with exceptions")
545
461 (icalendar-testsuite--test-import 546 (icalendar-testsuite--test-import
462 "SUMMARY:rrule weekly 547 "SUMMARY:rrule weekly
463DTSTART;VALUE=DATE-TIME:20030919T090000 548DTSTART;VALUE=DATE-TIME:20030919T090000
464DTEND;VALUE=DATE-TIME:20030919T113000 549DTEND;VALUE=DATE-TIME:20030919T113000
465RRULE:FREQ=WEEKLY; 550RRULE:FREQ=WEEKLY;
466" 551"
552 "&%%(and (diary-cyclic 7 2003 9 19)) 09:00-11:30 rrule weekly"
467 "&%%(and (diary-cyclic 7 19 9 2003)) 09:00-11:30 rrule weekly" 553 "&%%(and (diary-cyclic 7 19 9 2003)) 09:00-11:30 rrule weekly"
468 "&%%(and (diary-cyclic 7 9 19 2003)) 09:00-11:30 rrule weekly") 554 "&%%(and (diary-cyclic 7 9 19 2003)) 09:00-11:30 rrule weekly")
469 (icalendar-testsuite--test-import 555 (icalendar-testsuite--test-import
@@ -472,6 +558,7 @@ DTSTART;VALUE=DATE-TIME:20030919T090000
472DTEND;VALUE=DATE-TIME:20030919T113000 558DTEND;VALUE=DATE-TIME:20030919T113000
473RRULE:FREQ=MONTHLY; 559RRULE:FREQ=MONTHLY;
474" 560"
561 "&%%(and (diary-date t t 19) (diary-block 2003 9 19 9999 1 1)) 09:00-11:30 rrule monthly no end"
475 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 1 1 9999)) 09:00-11:30 rrule monthly no end" 562 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 1 1 9999)) 09:00-11:30 rrule monthly no end"
476 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 1 1 9999)) 09:00-11:30 rrule monthly no end") 563 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 1 1 9999)) 09:00-11:30 rrule monthly no end")
477 (icalendar-testsuite--test-import 564 (icalendar-testsuite--test-import
@@ -480,6 +567,7 @@ DTSTART;VALUE=DATE-TIME:20030919T090000
480DTEND;VALUE=DATE-TIME:20030919T113000 567DTEND;VALUE=DATE-TIME:20030919T113000
481RRULE:FREQ=MONTHLY;UNTIL=20050819; 568RRULE:FREQ=MONTHLY;UNTIL=20050819;
482" 569"
570 "&%%(and (diary-date t t 19) (diary-block 2003 9 19 2005 8 19)) 09:00-11:30 rrule monthly with end"
483 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 8 2005)) 09:00-11:30 rrule monthly with end" 571 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 8 2005)) 09:00-11:30 rrule monthly with end"
484 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 8 19 2005)) 09:00-11:30 rrule monthly with end") 572 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 8 19 2005)) 09:00-11:30 rrule monthly with end")
485 (icalendar-testsuite--test-import 573 (icalendar-testsuite--test-import
@@ -489,6 +577,7 @@ SUMMARY:Maria Himmelfahrt
489UID:CC56BEA6-49D2-11D8-8833-00039386D1C2-RID 577UID:CC56BEA6-49D2-11D8-8833-00039386D1C2-RID
490RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=8 578RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=8
491" 579"
580 "&%%(and (diary-anniversary 2004 8 15)) Maria Himmelfahrt"
492 "&%%(and (diary-anniversary 15 8 2004)) Maria Himmelfahrt" 581 "&%%(and (diary-anniversary 15 8 2004)) Maria Himmelfahrt"
493 "&%%(and (diary-anniversary 8 15 2004)) Maria Himmelfahrt") 582 "&%%(and (diary-anniversary 8 15 2004)) Maria Himmelfahrt")
494 (icalendar-testsuite--test-import 583 (icalendar-testsuite--test-import
@@ -497,6 +586,7 @@ DTSTART;VALUE=DATE-TIME:20030919T090000
497DTEND;VALUE=DATE-TIME:20030919T113000 586DTEND;VALUE=DATE-TIME:20030919T113000
498RRULE:FREQ=YEARLY;INTERVAL=2 587RRULE:FREQ=YEARLY;INTERVAL=2
499" 588"
589 "&%%(and (diary-anniversary 2003 9 19)) 09:00-11:30 rrule yearly" ;FIXME
500 "&%%(and (diary-anniversary 19 9 2003)) 09:00-11:30 rrule yearly" ;FIXME 590 "&%%(and (diary-anniversary 19 9 2003)) 09:00-11:30 rrule yearly" ;FIXME
501 "&%%(and (diary-anniversary 9 19 2003)) 09:00-11:30 rrule yearly") ;FIXME 591 "&%%(and (diary-anniversary 9 19 2003)) 09:00-11:30 rrule yearly") ;FIXME
502 (icalendar-testsuite--test-import 592 (icalendar-testsuite--test-import
@@ -505,6 +595,7 @@ DTSTART;VALUE=DATE-TIME:20030919T090000
505DTEND;VALUE=DATE-TIME:20030919T113000 595DTEND;VALUE=DATE-TIME:20030919T113000
506RRULE:FREQ=DAILY;COUNT=1;INTERVAL=1 596RRULE:FREQ=DAILY;COUNT=1;INTERVAL=1
507" 597"
598 "&%%(and (diary-cyclic 1 2003 9 19) (diary-block 2003 9 19 2003 9 19)) 09:00-11:30 rrule count daily short"
508 "&%%(and (diary-cyclic 1 19 9 2003) (diary-block 19 9 2003 19 9 2003)) 09:00-11:30 rrule count daily short" 599 "&%%(and (diary-cyclic 1 19 9 2003) (diary-block 19 9 2003 19 9 2003)) 09:00-11:30 rrule count daily short"
509 "&%%(and (diary-cyclic 1 9 19 2003) (diary-block 9 19 2003 9 19 2003)) 09:00-11:30 rrule count daily short") 600 "&%%(and (diary-cyclic 1 9 19 2003) (diary-block 9 19 2003 9 19 2003)) 09:00-11:30 rrule count daily short")
510 (icalendar-testsuite--test-import 601 (icalendar-testsuite--test-import
@@ -513,6 +604,7 @@ DTSTART;VALUE=DATE-TIME:20030919T090000
513DTEND;VALUE=DATE-TIME:20030919T113000 604DTEND;VALUE=DATE-TIME:20030919T113000
514RRULE:FREQ=DAILY;COUNT=14;INTERVAL=1 605RRULE:FREQ=DAILY;COUNT=14;INTERVAL=1
515" 606"
607 "&%%(and (diary-cyclic 1 2003 9 19) (diary-block 2003 9 19 2003 10 2)) 09:00-11:30 rrule count daily long"
516 "&%%(and (diary-cyclic 1 19 9 2003) (diary-block 19 9 2003 2 10 2003)) 09:00-11:30 rrule count daily long" 608 "&%%(and (diary-cyclic 1 19 9 2003) (diary-block 19 9 2003 2 10 2003)) 09:00-11:30 rrule count daily long"
517 "&%%(and (diary-cyclic 1 9 19 2003) (diary-block 9 19 2003 10 2 2003)) 09:00-11:30 rrule count daily long") 609 "&%%(and (diary-cyclic 1 9 19 2003) (diary-block 9 19 2003 10 2 2003)) 09:00-11:30 rrule count daily long")
518 (icalendar-testsuite--test-import 610 (icalendar-testsuite--test-import
@@ -521,6 +613,7 @@ DTSTART;VALUE=DATE-TIME:20030919T090000
521DTEND;VALUE=DATE-TIME:20030919T113000 613DTEND;VALUE=DATE-TIME:20030919T113000
522RRULE:FREQ=WEEKLY;COUNT=3;INTERVAL=2 614RRULE:FREQ=WEEKLY;COUNT=3;INTERVAL=2
523" 615"
616 "&%%(and (diary-cyclic 14 2003 9 19) (diary-block 2003 9 19 2003 10 31)) 09:00-11:30 rrule count bi-weekly 3 times"
524 "&%%(and (diary-cyclic 14 19 9 2003) (diary-block 19 9 2003 31 10 2003)) 09:00-11:30 rrule count bi-weekly 3 times" 617 "&%%(and (diary-cyclic 14 19 9 2003) (diary-block 19 9 2003 31 10 2003)) 09:00-11:30 rrule count bi-weekly 3 times"
525 "&%%(and (diary-cyclic 14 9 19 2003) (diary-block 9 19 2003 10 31 2003)) 09:00-11:30 rrule count bi-weekly 3 times") 618 "&%%(and (diary-cyclic 14 9 19 2003) (diary-block 9 19 2003 10 31 2003)) 09:00-11:30 rrule count bi-weekly 3 times")
526 (icalendar-testsuite--test-import 619 (icalendar-testsuite--test-import
@@ -529,6 +622,7 @@ DTSTART;VALUE=DATE-TIME:20030919T090000
529DTEND;VALUE=DATE-TIME:20030919T113000 622DTEND;VALUE=DATE-TIME:20030919T113000
530RRULE:FREQ=MONTHLY;INTERVAL=1;COUNT=5 623RRULE:FREQ=MONTHLY;INTERVAL=1;COUNT=5
531" 624"
625 "&%%(and (diary-date t t 19) (diary-block 2003 9 19 2004 1 19)) 09:00-11:30 rrule count monthly"
532 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 1 2004)) 09:00-11:30 rrule count monthly" 626 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 1 2004)) 09:00-11:30 rrule count monthly"
533 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 1 19 2004)) 09:00-11:30 rrule count monthly") 627 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 1 19 2004)) 09:00-11:30 rrule count monthly")
534 (icalendar-testsuite--test-import 628 (icalendar-testsuite--test-import
@@ -537,6 +631,7 @@ DTSTART;VALUE=DATE-TIME:20030919T090000
537DTEND;VALUE=DATE-TIME:20030919T113000 631DTEND;VALUE=DATE-TIME:20030919T113000
538RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=5 632RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=5
539" 633"
634 "&%%(and (diary-date t t 19) (diary-block 2003 9 19 2004 5 19)) 09:00-11:30 rrule count every second month" ;FIXME
540 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 5 2004)) 09:00-11:30 rrule count every second month" ;FIXME 635 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 5 2004)) 09:00-11:30 rrule count every second month" ;FIXME
541 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 5 19 2004)) 09:00-11:30 rrule count every second month") ;FIXME 636 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 5 19 2004)) 09:00-11:30 rrule count every second month") ;FIXME
542 (icalendar-testsuite--test-import 637 (icalendar-testsuite--test-import
@@ -545,6 +640,7 @@ DTSTART;VALUE=DATE-TIME:20030919T090000
545DTEND;VALUE=DATE-TIME:20030919T113000 640DTEND;VALUE=DATE-TIME:20030919T113000
546RRULE:FREQ=YEARLY;INTERVAL=1;COUNT=5 641RRULE:FREQ=YEARLY;INTERVAL=1;COUNT=5
547" 642"
643 "&%%(and (diary-date t 9 19) (diary-block 2003 9 19 2007 9 19)) 09:00-11:30 rrule count yearly"
548 "&%%(and (diary-date 19 9 t) (diary-block 19 9 2003 19 9 2007)) 09:00-11:30 rrule count yearly" 644 "&%%(and (diary-date 19 9 t) (diary-block 19 9 2003 19 9 2007)) 09:00-11:30 rrule count yearly"
549 "&%%(and (diary-date 9 19 t) (diary-block 9 19 2003 9 19 2007)) 09:00-11:30 rrule count yearly") 645 "&%%(and (diary-date 9 19 t) (diary-block 9 19 2003 9 19 2007)) 09:00-11:30 rrule count yearly")
550 (icalendar-testsuite--test-import 646 (icalendar-testsuite--test-import
@@ -553,6 +649,7 @@ DTSTART;VALUE=DATE-TIME:20030919T090000
553DTEND;VALUE=DATE-TIME:20030919T113000 649DTEND;VALUE=DATE-TIME:20030919T113000
554RRULE:FREQ=YEARLY;INTERVAL=2;COUNT=5 650RRULE:FREQ=YEARLY;INTERVAL=2;COUNT=5
555" 651"
652 "&%%(and (diary-date t 9 19) (diary-block 2003 9 19 2011 9 19)) 09:00-11:30 rrule count every second year" ;FIXME!!!
556 "&%%(and (diary-date 19 9 t) (diary-block 19 9 2003 19 9 2011)) 09:00-11:30 rrule count every second year" ;FIXME!!! 653 "&%%(and (diary-date 19 9 t) (diary-block 19 9 2003 19 9 2011)) 09:00-11:30 rrule count every second year" ;FIXME!!!
557 "&%%(and (diary-date 9 19 t) (diary-block 9 19 2003 9 19 2011)) 09:00-11:30 rrule count every second year") ;FIXME!!! 654 "&%%(and (diary-date 9 19 t) (diary-block 9 19 2003 9 19 2011)) 09:00-11:30 rrule count every second year") ;FIXME!!!
558 655
@@ -562,6 +659,7 @@ RRULE:FREQ=YEARLY;INTERVAL=2;COUNT=5
562SUMMARY:duration 659SUMMARY:duration
563DURATION:P7D 660DURATION:P7D
564" 661"
662 "&%%(and (diary-block 2005 2 17 2005 2 23)) duration"
565 "&%%(and (diary-block 17 2 2005 23 2 2005)) duration" 663 "&%%(and (diary-block 17 2 2005 23 2 2005)) duration"
566 "&%%(and (diary-block 2 17 2005 2 23 2005)) duration") 664 "&%%(and (diary-block 2 17 2005 2 23 2005)) duration")
567 665
@@ -577,6 +675,7 @@ CLASS:PUBLIC
577SEQUENCE:1 675SEQUENCE:1
578CREATED:20041127T183329 676CREATED:20041127T183329
579" 677"
678 "&%%(and (diary-cyclic 1 2001 12 21) (diary-block 2001 12 21 2001 12 29)) Urlaub"
580 "&%%(and (diary-cyclic 1 21 12 2001) (diary-block 21 12 2001 29 12 2001)) Urlaub" 679 "&%%(and (diary-cyclic 1 21 12 2001) (diary-block 21 12 2001 29 12 2001)) Urlaub"
581 "&%%(and (diary-cyclic 1 12 21 2001) (diary-block 12 21 2001 12 29 2001)) Urlaub") 680 "&%%(and (diary-cyclic 1 12 21 2001) (diary-block 12 21 2001 12 29 2001)) Urlaub")
582 ) 681 )
@@ -589,19 +688,22 @@ CREATED:20041127T183329
589 688
590 (let ((icalendar-export-hidden-diary-entries nil)) 689 (let ((icalendar-export-hidden-diary-entries nil))
591 (icalendar-testsuite--test-export 690 (icalendar-testsuite--test-export
691 "&2000 Oct 3 ordinary no time "
592 "&3 Okt 2000 ordinary no time " 692 "&3 Okt 2000 ordinary no time "
593 "&Oct 3 2000 ordinary no time " 693 "&Oct 3 2000 ordinary no time "
594 nil)) 694 nil))
595 695
596 ;; "ordinary" events 696 ;; "ordinary" events
597 (icalendar-testsuite--test-export 697 (icalendar-testsuite--test-export
698 "2000 Oct 3 ordinary no time "
598 "3 Okt 2000 ordinary no time " 699 "3 Okt 2000 ordinary no time "
599 "Oct 3 2000 ordinary no time " 700 "Oct 3 2000 ordinary no time "
600 "DTSTART;VALUE=DATE:20001003 701 "DTSTART;VALUE=DATE:20001003
601DTEND;VALUE=DATE:20001004 702DTEND;VALUE=DATE:20001004
602SUMMARY:ordinary no time 703SUMMARY:ordinary no time
603") 704")
604 (icalendar-testsuite--test-export 705 (icalendar-testsuite--test-export
706 "2000 Oct 3 16:30 ordinary with time"
605 "3 Okt 2000 16:30 ordinary with time" 707 "3 Okt 2000 16:30 ordinary with time"
606 "Oct 3 2000 16:30 ordinary with time" 708 "Oct 3 2000 16:30 ordinary with time"
607 "DTSTART;VALUE=DATE-TIME:20001003T163000 709 "DTSTART;VALUE=DATE-TIME:20001003T163000
@@ -609,6 +711,7 @@ DTEND;VALUE=DATE-TIME:20001003T173000
609SUMMARY:ordinary with time 711SUMMARY:ordinary with time
610") 712")
611 (icalendar-testsuite--test-export 713 (icalendar-testsuite--test-export
714 "2000 10 3 16:30 ordinary with time 2"
612 "3 10 2000 16:30 ordinary with time 2" 715 "3 10 2000 16:30 ordinary with time 2"
613 "10 3 2000 16:30 ordinary with time 2" 716 "10 3 2000 16:30 ordinary with time 2"
614 "DTSTART;VALUE=DATE-TIME:20001003T163000 717 "DTSTART;VALUE=DATE-TIME:20001003T163000
@@ -617,6 +720,7 @@ SUMMARY:ordinary with time 2
617") 720")
618 721
619 (icalendar-testsuite--test-export 722 (icalendar-testsuite--test-export
723 "2000/10/3 16:30 ordinary with time 3"
620 "3/10/2000 16:30 ordinary with time 3" 724 "3/10/2000 16:30 ordinary with time 3"
621 "10/3/2000 16:30 ordinary with time 3" 725 "10/3/2000 16:30 ordinary with time 3"
622 "DTSTART;VALUE=DATE-TIME:20001003T163000 726 "DTSTART;VALUE=DATE-TIME:20001003T163000
@@ -626,6 +730,8 @@ SUMMARY:ordinary with time 3
626 730
627 ;; multiline -- FIXME!!! 731 ;; multiline -- FIXME!!!
628 (icalendar-testsuite--test-export 732 (icalendar-testsuite--test-export
733 "2000 October 3 16:30 multiline
734 17:30 multiline continued FIXME"
629 "3 Oktober 2000 16:30 multiline 735 "3 Oktober 2000 16:30 multiline
630 17:30 multiline continued FIXME" 736 17:30 multiline continued FIXME"
631 "October 3 2000 16:30 multiline 737 "October 3 2000 16:30 multiline
@@ -639,6 +745,7 @@ DESCRIPTION:
639 745
640 ;; weekly by day 746 ;; weekly by day
641 (icalendar-testsuite--test-export 747 (icalendar-testsuite--test-export
748 "Monday 1:30pm weekly by day with start time"
642 "Montag 13:30 weekly by day with start time" 749 "Montag 13:30 weekly by day with start time"
643 "Monday 1:30pm weekly by day with start time" 750 "Monday 1:30pm weekly by day with start time"
644 "DTSTART;VALUE=DATE-TIME:20000103T133000 751 "DTSTART;VALUE=DATE-TIME:20000103T133000
@@ -648,6 +755,7 @@ SUMMARY:weekly by day with start time
648") 755")
649 756
650 (icalendar-testsuite--test-export 757 (icalendar-testsuite--test-export
758 "Monday 13:30-15:00 weekly by day with start and end time"
651 "Montag 13:30-15:00 weekly by day with start and end time" 759 "Montag 13:30-15:00 weekly by day with start and end time"
652 "Monday 01:30pm-03:00pm weekly by day with start and end time" 760 "Monday 01:30pm-03:00pm weekly by day with start and end time"
653 "DTSTART;VALUE=DATE-TIME:20000103T133000 761 "DTSTART;VALUE=DATE-TIME:20000103T133000
@@ -658,6 +766,7 @@ SUMMARY:weekly by day with start and end time
658 766
659 ;; yearly 767 ;; yearly
660 (icalendar-testsuite--test-export 768 (icalendar-testsuite--test-export
769 "may 1 yearly no time"
661 "1 Mai yearly no time" 770 "1 Mai yearly no time"
662 "may 1 yearly no time" 771 "may 1 yearly no time"
663 "DTSTART;VALUE=DATE:19000501 772 "DTSTART;VALUE=DATE:19000501
@@ -668,6 +777,7 @@ SUMMARY:yearly no time
668 777
669 ;; anniversaries 778 ;; anniversaries
670 (icalendar-testsuite--test-export 779 (icalendar-testsuite--test-export
780 "%%(diary-anniversary 1989 10 3) anniversary no time"
671 "%%(diary-anniversary 3 10 1989) anniversary no time" 781 "%%(diary-anniversary 3 10 1989) anniversary no time"
672 "%%(diary-anniversary 10 3 1989) anniversary no time" 782 "%%(diary-anniversary 10 3 1989) anniversary no time"
673 "DTSTART;VALUE=DATE:19891003 783 "DTSTART;VALUE=DATE:19891003
@@ -676,6 +786,7 @@ RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=10;BYMONTHDAY=03
676SUMMARY:anniversary no time 786SUMMARY:anniversary no time
677") 787")
678 (icalendar-testsuite--test-export 788 (icalendar-testsuite--test-export
789 "%%(diary-anniversary 1989 10 3) 19:00-20:00 anniversary with time"
679 "%%(diary-anniversary 3 10 1989) 19:00-20:00 anniversary with time" 790 "%%(diary-anniversary 3 10 1989) 19:00-20:00 anniversary with time"
680 "%%(diary-anniversary 10 3 1989) 19:00-20:00 anniversary with time" 791 "%%(diary-anniversary 10 3 1989) 19:00-20:00 anniversary with time"
681 "DTSTART;VALUE=DATE-TIME:19891003T190000 792 "DTSTART;VALUE=DATE-TIME:19891003T190000
@@ -686,6 +797,7 @@ SUMMARY:anniversary with time
686 797
687 ;; block 798 ;; block
688 (icalendar-testsuite--test-export 799 (icalendar-testsuite--test-export
800 "%%(diary-block 2001 6 18 2001 7 6) block no time"
689 "%%(diary-block 18 6 2001 6 7 2001) block no time" 801 "%%(diary-block 18 6 2001 6 7 2001) block no time"
690 "%%(diary-block 6 18 2001 7 6 2001) block no time" 802 "%%(diary-block 6 18 2001 7 6 2001) block no time"
691 "DTSTART;VALUE=DATE:20010618 803 "DTSTART;VALUE=DATE:20010618
@@ -693,6 +805,7 @@ DTEND;VALUE=DATE:20010707
693SUMMARY:block no time 805SUMMARY:block no time
694") 806")
695 (icalendar-testsuite--test-export 807 (icalendar-testsuite--test-export
808 "%%(diary-block 2001 6 18 2001 7 6) 13:00-17:00 block with time"
696 "%%(diary-block 18 6 2001 6 7 2001) 13:00-17:00 block with time" 809 "%%(diary-block 18 6 2001 6 7 2001) 13:00-17:00 block with time"
697 "%%(diary-block 6 18 2001 7 6 2001) 13:00-17:00 block with time" 810 "%%(diary-block 6 18 2001 7 6 2001) 13:00-17:00 block with time"
698 "DTSTART;VALUE=DATE-TIME:20010618T130000 811 "DTSTART;VALUE=DATE-TIME:20010618T130000
@@ -701,6 +814,7 @@ RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20010706
701SUMMARY:block with time 814SUMMARY:block with time
702") 815")
703 (icalendar-testsuite--test-export 816 (icalendar-testsuite--test-export
817 "%%(diary-block 2001 6 18 2001 7 6) 13:00 block no end time"
704 "%%(diary-block 18 6 2001 6 7 2001) 13:00 block no end time" 818 "%%(diary-block 18 6 2001 6 7 2001) 13:00 block no end time"
705 "%%(diary-block 6 18 2001 7 6 2001) 13:00 block no end time" 819 "%%(diary-block 6 18 2001 7 6 2001) 13:00 block no end time"
706 "DTSTART;VALUE=DATE-TIME:20010618T130000 820 "DTSTART;VALUE=DATE-TIME:20010618T130000
@@ -771,6 +885,7 @@ TRIGGER;RELATED=START:-PT00H15M00S
771END:VALARM 885END:VALARM
772END:VEVENT 886END:VEVENT
773END:VCALENDAR" 887END:VCALENDAR"
888 nil
774 "&9/5/2003 10:30-15:30 On-Site Interview 889 "&9/5/2003 10:30-15:30 On-Site Interview
775 Desc: 10:30am - Blah 890 Desc: 10:30am - Blah
776 Location: Cccc 891 Location: Cccc
@@ -812,6 +927,7 @@ ACTION:DISPLAY
812DESCRIPTION:REMINDER 927DESCRIPTION:REMINDER
813TRIGGER;RELATED=START:-PT00H15M00S 928TRIGGER;RELATED=START:-PT00H15M00S
814END:VALARM" 929END:VALARM"
930 nil
815 "&23/6/2003 11:00-12:00 Dress Rehearsal for XXXX-XXXX 931 "&23/6/2003 11:00-12:00 Dress Rehearsal for XXXX-XXXX
816 Desc: 753 Zeichen hier radiert 932 Desc: 753 Zeichen hier radiert
817 Location: 555 or TN 555-5555 ID 5555 & NochWas (see below) 933 Location: 555 or TN 555-5555 ID 5555 & NochWas (see below)
@@ -878,6 +994,7 @@ TRIGGER;RELATED=START:-PT00H15M00S
878END:VALARM 994END:VALARM
879END:VEVENT 995END:VEVENT
880END:VCALENDAR" 996END:VCALENDAR"
997 nil
881 "&23/6/2003 17:00-18:00 Updated: Dress Rehearsal for ABC01-15 998 "&23/6/2003 17:00-18:00 Updated: Dress Rehearsal for ABC01-15
882 Desc: Viele Zeichen standen hier früher 999 Desc: Viele Zeichen standen hier früher
883 Location: 123 or TN 123-1234 ID abcd & SonstWo (see below) 1000 Location: 123 or TN 123-1234 ID abcd & SonstWo (see below)
@@ -892,6 +1009,7 @@ END:VCALENDAR"
892 ;; export 2004-10-28 block entries 1009 ;; export 2004-10-28 block entries
893 (icalendar-testsuite--test-export 1010 (icalendar-testsuite--test-export
894 nil 1011 nil
1012 nil
895 "-*- mode: text; fill-column: 256;-*- 1013 "-*- mode: text; fill-column: 256;-*-
896 1014
897>>> block entries: 1015>>> block entries:
@@ -904,6 +1022,7 @@ SUMMARY:Nov 8-10 aa")
904 1022
905 (icalendar-testsuite--test-export 1023 (icalendar-testsuite--test-export
906 nil 1024 nil
1025 nil
907 "%%(diary-block 12 13 2004 12 17 2004) Dec 13-17 bb" 1026 "%%(diary-block 12 13 2004 12 17 2004) Dec 13-17 bb"
908 "DTSTART;VALUE=DATE:20041213 1027 "DTSTART;VALUE=DATE:20041213
909DTEND;VALUE=DATE:20041218 1028DTEND;VALUE=DATE:20041218
@@ -911,6 +1030,7 @@ SUMMARY:Dec 13-17 bb")
911 1030
912 (icalendar-testsuite--test-export 1031 (icalendar-testsuite--test-export
913 nil 1032 nil
1033 nil
914 "%%(diary-block 2 3 2005 2 4 2005) Feb 3-4 cc" 1034 "%%(diary-block 2 3 2005 2 4 2005) Feb 3-4 cc"
915 "DTSTART;VALUE=DATE:20050203 1035 "DTSTART;VALUE=DATE:20050203
916DTEND;VALUE=DATE:20050205 1036DTEND;VALUE=DATE:20050205
@@ -918,6 +1038,7 @@ SUMMARY:Feb 3-4 cc")
918 1038
919 (icalendar-testsuite--test-export 1039 (icalendar-testsuite--test-export
920 nil 1040 nil
1041 nil
921 "%%(diary-block 4 24 2005 4 29 2005) April 24-29 dd" 1042 "%%(diary-block 4 24 2005 4 29 2005) April 24-29 dd"
922 "DTSTART;VALUE=DATE:20050424 1043 "DTSTART;VALUE=DATE:20050424
923DTEND;VALUE=DATE:20050430 1044DTEND;VALUE=DATE:20050430
@@ -925,6 +1046,7 @@ SUMMARY:April 24-29 dd
925") 1046")
926 (icalendar-testsuite--test-export 1047 (icalendar-testsuite--test-export
927 nil 1048 nil
1049 nil
928 "%%(diary-block 5 30 2005 6 1 2005) may 30 - June 1: ee" 1050 "%%(diary-block 5 30 2005 6 1 2005) may 30 - June 1: ee"
929 "DTSTART;VALUE=DATE:20050530 1051 "DTSTART;VALUE=DATE:20050530
930DTEND;VALUE=DATE:20050602 1052DTEND;VALUE=DATE:20050602
@@ -932,6 +1054,7 @@ SUMMARY:may 30 - June 1: ee")
932 1054
933 (icalendar-testsuite--test-export 1055 (icalendar-testsuite--test-export
934 nil 1056 nil
1057 nil
935 "%%(diary-block 6 6 2005 6 8 2005) ff" 1058 "%%(diary-block 6 6 2005 6 8 2005) ff"
936 "DTSTART;VALUE=DATE:20050606 1059 "DTSTART;VALUE=DATE:20050606
937DTEND;VALUE=DATE:20050609 1060DTEND;VALUE=DATE:20050609
@@ -940,6 +1063,7 @@ SUMMARY:ff")
940 ;; export 2004-10-28 anniversary entries 1063 ;; export 2004-10-28 anniversary entries
941 (icalendar-testsuite--test-export 1064 (icalendar-testsuite--test-export
942 nil 1065 nil
1066 nil
943 " 1067 "
944>>> anniversaries: 1068>>> anniversaries:
945 1069
@@ -952,6 +1076,7 @@ SUMMARY:aa birthday (%d years old)
952 1076
953 (icalendar-testsuite--test-export 1077 (icalendar-testsuite--test-export
954 nil 1078 nil
1079 nil
955 "%%(diary-anniversary 5 17 1957) bb birthday (%d years old)" 1080 "%%(diary-anniversary 5 17 1957) bb birthday (%d years old)"
956 "DTSTART;VALUE=DATE:19570517 1081 "DTSTART;VALUE=DATE:19570517
957DTEND;VALUE=DATE:19570518 1082DTEND;VALUE=DATE:19570518
@@ -960,6 +1085,7 @@ SUMMARY:bb birthday (%d years old)")
960 1085
961 (icalendar-testsuite--test-export 1086 (icalendar-testsuite--test-export
962 nil 1087 nil
1088 nil
963 "%%(diary-anniversary 6 8 1997) cc birthday (%d years old)" 1089 "%%(diary-anniversary 6 8 1997) cc birthday (%d years old)"
964 "DTSTART;VALUE=DATE:19970608 1090 "DTSTART;VALUE=DATE:19970608
965DTEND;VALUE=DATE:19970609 1091DTEND;VALUE=DATE:19970609
@@ -968,6 +1094,7 @@ SUMMARY:cc birthday (%d years old)")
968 1094
969 (icalendar-testsuite--test-export 1095 (icalendar-testsuite--test-export
970 nil 1096 nil
1097 nil
971 "%%(diary-anniversary 7 22 1983) dd (%d years ago...!)" 1098 "%%(diary-anniversary 7 22 1983) dd (%d years ago...!)"
972 "DTSTART;VALUE=DATE:19830722 1099 "DTSTART;VALUE=DATE:19830722
973DTEND;VALUE=DATE:19830723 1100DTEND;VALUE=DATE:19830723
@@ -976,6 +1103,7 @@ SUMMARY:dd (%d years ago...!)")
976 1103
977 (icalendar-testsuite--test-export 1104 (icalendar-testsuite--test-export
978 nil 1105 nil
1106 nil
979 "%%(diary-anniversary 8 1 1988) ee birthday (%d years old)" 1107 "%%(diary-anniversary 8 1 1988) ee birthday (%d years old)"
980 "DTSTART;VALUE=DATE:19880801 1108 "DTSTART;VALUE=DATE:19880801
981DTEND;VALUE=DATE:19880802 1109DTEND;VALUE=DATE:19880802
@@ -984,6 +1112,7 @@ SUMMARY:ee birthday (%d years old)")
984 1112
985 (icalendar-testsuite--test-export 1113 (icalendar-testsuite--test-export
986 nil 1114 nil
1115 nil
987 "%%(diary-anniversary 9 21 1957) ff birthday (%d years old)" 1116 "%%(diary-anniversary 9 21 1957) ff birthday (%d years old)"
988 "DTSTART;VALUE=DATE:19570921 1117 "DTSTART;VALUE=DATE:19570921
989DTEND;VALUE=DATE:19570922 1118DTEND;VALUE=DATE:19570922
@@ -1005,6 +1134,7 @@ SUMMARY:ff birthday (%d years old)")
1005 1134
1006 (icalendar-testsuite--test-export 1135 (icalendar-testsuite--test-export
1007 nil 1136 nil
1137 nil
1008 ">>> ------------ my week: 1138 ">>> ------------ my week:
1009 1139
1010Monday 13:00 MAC" 1140Monday 13:00 MAC"
@@ -1015,6 +1145,7 @@ SUMMARY:MAC")
1015 1145
1016 (icalendar-testsuite--test-export 1146 (icalendar-testsuite--test-export
1017 nil 1147 nil
1148 nil
1018 "Monday 15:00 a1" 1149 "Monday 15:00 a1"
1019 "DTSTART;VALUE=DATE-TIME:20000103T150000 1150 "DTSTART;VALUE=DATE-TIME:20000103T150000
1020DTEND;VALUE=DATE-TIME:20000103T160000 1151DTEND;VALUE=DATE-TIME:20000103T160000
@@ -1024,6 +1155,7 @@ SUMMARY:a1")
1024 1155
1025 (icalendar-testsuite--test-export 1156 (icalendar-testsuite--test-export
1026 nil 1157 nil
1158 nil
1027 "Monday 16:00-17:00 a2" 1159 "Monday 16:00-17:00 a2"
1028 "DTSTART;VALUE=DATE-TIME:20000103T160000 1160 "DTSTART;VALUE=DATE-TIME:20000103T160000
1029DTEND;VALUE=DATE-TIME:20000103T170000 1161DTEND;VALUE=DATE-TIME:20000103T170000
@@ -1032,6 +1164,7 @@ SUMMARY:a2")
1032 1164
1033 (icalendar-testsuite--test-export 1165 (icalendar-testsuite--test-export
1034 nil 1166 nil
1167 nil
1035 "Tuesday 11:30-13:00 a3" 1168 "Tuesday 11:30-13:00 a3"
1036 "DTSTART;VALUE=DATE-TIME:20000104T113000 1169 "DTSTART;VALUE=DATE-TIME:20000104T113000
1037DTEND;VALUE=DATE-TIME:20000104T130000 1170DTEND;VALUE=DATE-TIME:20000104T130000
@@ -1040,6 +1173,7 @@ SUMMARY:a3")
1040 1173
1041 (icalendar-testsuite--test-export 1174 (icalendar-testsuite--test-export
1042 nil 1175 nil
1176 nil
1043 "Tuesday 15:00 a4" 1177 "Tuesday 15:00 a4"
1044 "DTSTART;VALUE=DATE-TIME:20000104T150000 1178 "DTSTART;VALUE=DATE-TIME:20000104T150000
1045DTEND;VALUE=DATE-TIME:20000104T160000 1179DTEND;VALUE=DATE-TIME:20000104T160000
@@ -1048,6 +1182,7 @@ SUMMARY:a4")
1048 1182
1049 (icalendar-testsuite--test-export 1183 (icalendar-testsuite--test-export
1050 nil 1184 nil
1185 nil
1051 "Wednesday 13:00 a5" 1186 "Wednesday 13:00 a5"
1052 "DTSTART;VALUE=DATE-TIME:20000105T130000 1187 "DTSTART;VALUE=DATE-TIME:20000105T130000
1053DTEND;VALUE=DATE-TIME:20000105T140000 1188DTEND;VALUE=DATE-TIME:20000105T140000
@@ -1056,6 +1191,7 @@ SUMMARY:a5")
1056 1191
1057 (icalendar-testsuite--test-export 1192 (icalendar-testsuite--test-export
1058 nil 1193 nil
1194 nil
1059 "Wednesday 11:30-13:30 a6" 1195 "Wednesday 11:30-13:30 a6"
1060 "DTSTART;VALUE=DATE-TIME:20000105T113000 1196 "DTSTART;VALUE=DATE-TIME:20000105T113000
1061DTEND;VALUE=DATE-TIME:20000105T133000 1197DTEND;VALUE=DATE-TIME:20000105T133000
@@ -1064,6 +1200,7 @@ SUMMARY:a6")
1064 1200
1065 (icalendar-testsuite--test-export 1201 (icalendar-testsuite--test-export
1066 nil 1202 nil
1203 nil
1067 "Wednesday 15:00 s1" 1204 "Wednesday 15:00 s1"
1068 "DTSTART;VALUE=DATE-TIME:20000105T150000 1205 "DTSTART;VALUE=DATE-TIME:20000105T150000
1069DTEND;VALUE=DATE-TIME:20000105T160000 1206DTEND;VALUE=DATE-TIME:20000105T160000
@@ -1074,6 +1211,7 @@ SUMMARY:s1")
1074 ;; export 2004-10-28 regular entries 1211 ;; export 2004-10-28 regular entries
1075 (icalendar-testsuite--test-export 1212 (icalendar-testsuite--test-export
1076 nil 1213 nil
1214 nil
1077 " 1215 "
1078>>> regular diary entries: 1216>>> regular diary entries:
1079 1217
@@ -1217,6 +1355,7 @@ LAST-MODIFIED
1217END:VEVENT 1355END:VEVENT
1218END:VCALENDAR 1356END:VCALENDAR
1219" 1357"
1358 nil
1220 "&23/11/2004 14:00-14:30 Jjjjj & Wwwww 1359 "&23/11/2004 14:00-14:30 Jjjjj & Wwwww
1221 Status: TENTATIVE 1360 Status: TENTATIVE
1222 Class: PRIVATE 1361 Class: PRIVATE
@@ -1260,12 +1399,14 @@ END:VCALENDAR
1260 (icalendar-testsuite--test-export 1399 (icalendar-testsuite--test-export
1261 "%%(diary-block 1 1 2004 4 1 2004) Urlaub" 1400 "%%(diary-block 1 1 2004 4 1 2004) Urlaub"
1262 nil 1401 nil
1402 nil
1263 "DTSTART;VALUE=DATE:20040101 1403 "DTSTART;VALUE=DATE:20040101
1264DTEND;VALUE=DATE:20040105 1404DTEND;VALUE=DATE:20040105
1265SUMMARY:Urlaub") 1405SUMMARY:Urlaub")
1266 1406
1267 ;; 2004-10-25 pg 1407 ;; 2004-10-25 pg
1268 (icalendar-testsuite--test-export 1408 (icalendar-testsuite--test-export
1409 nil
1269 "5 11 2004 Bla Fasel" 1410 "5 11 2004 Bla Fasel"
1270 nil 1411 nil
1271 "DTSTART;VALUE=DATE:20041105 1412 "DTSTART;VALUE=DATE:20041105
@@ -1274,6 +1415,7 @@ SUMMARY:Bla Fasel")
1274 1415
1275 ;; 2004-10-30 pg 1416 ;; 2004-10-30 pg
1276 (icalendar-testsuite--test-export 1417 (icalendar-testsuite--test-export
1418 nil
1277 "2 Nov 2004 15:00-16:30 Zahnarzt" 1419 "2 Nov 2004 15:00-16:30 Zahnarzt"
1278 nil 1420 nil
1279 "DTSTART;VALUE=DATE-TIME:20041102T150000 1421 "DTSTART;VALUE=DATE-TIME:20041102T150000
@@ -1302,6 +1444,7 @@ DTEND
1302 :20050207 1444 :20050207
1303DTSTAMP 1445DTSTAMP
1304 :20050128T011209Z" 1446 :20050128T011209Z"
1447 nil
1305 "&%%(and (diary-block 6 2 2005 6 2 2005)) Waitangi Day 1448 "&%%(and (diary-block 6 2 2005 6 2 2005)) Waitangi Day
1306 Desc: abcdef" 1449 Desc: abcdef"
1307 "&%%(and (diary-block 2 6 2005 2 6 2005)) Waitangi Day 1450 "&%%(and (diary-block 2 6 2005 2 6 2005)) Waitangi Day
@@ -1314,11 +1457,13 @@ SUMMARY:Hhhhhh Aaaaa ii Aaaaaaaa
1314UID:6AFA7558-6994-11D9-8A3A-000A95A0E830-RID 1457UID:6AFA7558-6994-11D9-8A3A-000A95A0E830-RID
1315DTSTAMP:20050118T210335Z 1458DTSTAMP:20050118T210335Z
1316DURATION:P7D" 1459DURATION:P7D"
1460 nil
1317 "&%%(and (diary-block 17 2 2005 23 2 2005)) Hhhhhh Aaaaa ii Aaaaaaaa" 1461 "&%%(and (diary-block 17 2 2005 23 2 2005)) Hhhhhh Aaaaa ii Aaaaaaaa"
1318 "&%%(and (diary-block 2 17 2005 2 23 2005)) Hhhhhh Aaaaa ii Aaaaaaaa") 1462 "&%%(and (diary-block 2 17 2005 2 23 2005)) Hhhhhh Aaaaa ii Aaaaaaaa")
1319 1463
1320 ;; 2005-03-23 lt 1464 ;; 2005-03-23 lt
1321 (icalendar-testsuite--test-export 1465 (icalendar-testsuite--test-export
1466 nil
1322 "&%%(diary-cyclic 7 8 2 2005) 16:00-16:45 [WORK] Pppp" 1467 "&%%(diary-cyclic 7 8 2 2005) 16:00-16:45 [WORK] Pppp"
1323 nil 1468 nil
1324 "DTSTART;VALUE=DATE-TIME:20050208T160000 1469 "DTSTART;VALUE=DATE-TIME:20050208T160000
@@ -1330,6 +1475,7 @@ SUMMARY:[WORK] Pppp
1330 ;; 2005-05-27 eu 1475 ;; 2005-05-27 eu
1331 (icalendar-testsuite--test-export 1476 (icalendar-testsuite--test-export
1332 nil 1477 nil
1478 nil
1333 ;; FIXME: colon not allowed! 1479 ;; FIXME: colon not allowed!
1334 ;;"Nov 1: NNN Wwwwwwww Wwwww - Aaaaaa Pppppppp rrrrrr ddd oo Nnnnnnnn 30" 1480 ;;"Nov 1: NNN Wwwwwwww Wwwww - Aaaaaa Pppppppp rrrrrr ddd oo Nnnnnnnn 30"
1335 "Nov 1 NNN Wwwwwwww Wwwww - Aaaaaa Pppppppp rrrrrr ddd oo Nnnnnnnn 30" 1481 "Nov 1 NNN Wwwwwwww Wwwww - Aaaaaa Pppppppp rrrrrr ddd oo Nnnnnnnn 30"
@@ -1341,6 +1487,7 @@ SUMMARY:NNN Wwwwwwww Wwwww - Aaaaaa Pppppppp rrrrrr ddd oo Nnnnnnnn 30
1341 ) 1487 )
1342 1488
1343(defun icalendar-testsuite--run-cycle-tests () 1489(defun icalendar-testsuite--run-cycle-tests ()
1490 "Perform cycling tests."
1344 (icalendar-testsuite--test-cycle 1491 (icalendar-testsuite--test-cycle
1345 "DTSTART;VALUE=DATE-TIME:20030919T090000 1492 "DTSTART;VALUE=DATE-TIME:20030919T090000
1346DTEND;VALUE=DATE-TIME:20030919T113000 1493DTEND;VALUE=DATE-TIME:20030919T113000