1 ;; icalendar-testsuite.el --- Test suite for icalendar.el
3 ;; Copyright (C) 2005, 2008, 2009 Free Software Foundation, Inc.
5 ;; Author: Ulf Jasper <ulf.jasper@web.de>
8 ;; Human-Keywords: calendar, diary, iCalendar, vCalendar
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software: you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation, either version 3 of the License, or
15 ;; (at your option) any later version.
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
28 ;; - Add more unit tests for functions, timezone etc.
30 ;; Note: Watch the trailing blank that is added on import.
33 (defun icalendar-testsuite-run ()
34 "Run icalendar test suite."
36 (icalendar-testsuite--run-function-tests)
37 (icalendar-testsuite--run-import-tests)
38 (icalendar-testsuite--run-export-tests)
39 (icalendar-testsuite--run-cycle-tests)
40 (icalendar-testsuite--run-real-world-tests)
41 (message "All icalendar tests finished successfully."))
43 ;; ======================================================================
44 ;; Test methods for functions
45 ;; ======================================================================
46 (defun icalendar-testsuite--run-function-tests ()
47 "Perform tests for single icalendar functions."
48 (icalendar-testsuite--test-parse-summary-and-rest)
49 (icalendar-testsuite--test-format-ical-event)
50 (icalendar-testsuite--test-import-format-sample)
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-diarytime-to-isotime)
55 (icalendar-testsuite--test-calendar-style)
56 (icalendar-testsuite--test-create-uid))
58 (defun icalendar-testsuite--test-format-ical-event ()
59 "Test `icalendar--format-ical-event'."
60 (let ((icalendar-import-format "%s%d%l%o%t%u%c")
61 (icalendar-import-format-summary "SUM %s")
62 (icalendar-import-format-location " LOC %s")
63 (icalendar-import-format-description " DES %s")
64 (icalendar-import-format-organizer " ORG %s")
65 (icalendar-import-format-status " STA %s")
66 (icalendar-import-format-url " URL %s")
67 (icalendar-import-format-class " CLA %s")
68 (event (icalendar-testsuite--get-ical-event "BEGIN:VEVENT
69 DTSTAMP:20030509T043439Z
70 DTSTART:20030509T103000
78 (assert (string= (icalendar--format-ical-event event
)
79 "SUM sum DES des LOC loc ORG org") t
)
80 (setq icalendar-import-format
(lambda (&rest ignore
)
82 (assert (string= (icalendar--format-ical-event event
)
84 (setq icalendar-import-format
86 (format "-%s-%s-%s-%s-%s-%s-%s-"
87 (icalendar--get-event-property event
'SUMMARY
)
88 (icalendar--get-event-property event
'DESCRIPTION
)
89 (icalendar--get-event-property event
'LOCATION
)
90 (icalendar--get-event-property event
'ORGANIZER
)
91 (icalendar--get-event-property event
'STATUS
)
92 (icalendar--get-event-property event
'URL
)
93 (icalendar--get-event-property event
'CLASS
))))
94 (assert (string= (icalendar--format-ical-event event
)
95 "-sum-des-loc-org-nil-nil-nil-") t
)))
97 (defun icalendar-testsuite--test-parse-summary-and-rest ()
98 "Test `icalendar--parse-summary-and-rest'."
99 (let ((icalendar-import-format "%s%d%l%o%t%u%c")
100 (icalendar-import-format-summary "SUM %s")
101 (icalendar-import-format-location " LOC %s")
102 (icalendar-import-format-description " DES %s")
103 (icalendar-import-format-organizer " ORG %s")
104 (icalendar-import-format-status " STA %s")
105 (icalendar-import-format-url " URL %s")
106 (icalendar-import-format-class " CLA %s")
108 (setq result
(icalendar--parse-summary-and-rest "SUM sum ORG org"))
109 (assert (string= (cdr (assoc 'org result
)) "org"))
111 (setq result
(icalendar--parse-summary-and-rest
112 "SUM sum DES des LOC loc ORG org STA sta URL url CLA cla"))
113 (assert (string= (cdr (assoc 'des result
)) "des"))
114 (assert (string= (cdr (assoc 'loc result
)) "loc"))
115 (assert (string= (cdr (assoc 'org result
)) "org"))
116 (assert (string= (cdr (assoc 'sta result
)) "sta"))
117 (assert (string= (cdr (assoc 'cla result
)) "cla"))
119 (setq icalendar-import-format
(lambda () "Hello world"))
120 (setq result
(icalendar--parse-summary-and-rest
122 (assert (not result
))
125 (defun icalendar-testsuite--get-ical-event (ical-string)
126 "Helper function for testing `icalendar-testsuite--test-format-ical-event'.
127 Return icalendar event for ICAL-STRING."
131 (goto-char (point-min))
132 (car (icalendar--read-element nil nil
)))))
134 (defun icalendar-testsuite--test-import-format-sample ()
135 "Test method for `icalendar-import-format-sample'."
136 (assert (string= (icalendar-import-format-sample
137 (icalendar-testsuite--get-ical-event "BEGIN:VEVENT
138 DTSTAMP:20030509T043439Z
139 DTSTART:20030509T103000
143 DTEND:20030509T153000
147 (concat "SUMMARY=`a' DESCRIPTION=`b' LOCATION=`c' "
148 "ORGANIZER=`d' STATUS=`' URL=`' CLASS=`'"))))
150 (defun icalendar-testsuite--test-first-weekday-of-year ()
151 "Test method for `icalendar-first-weekday-of-year'."
152 (assert (eq 1 (icalendar-first-weekday-of-year "TU" 2008)))
153 (assert (eq 3 (icalendar-first-weekday-of-year "WE" 2007)))
154 (assert (eq 5 (icalendar-first-weekday-of-year "TH" 2006)))
155 (assert (eq 7 (icalendar-first-weekday-of-year "FR" 2005)))
156 (assert (eq 3 (icalendar-first-weekday-of-year "SA" 2004)))
157 (assert (eq 5 (icalendar-first-weekday-of-year "SU" 2003)))
158 (assert (eq 7 (icalendar-first-weekday-of-year "MO" 2002)))
159 (assert (eq 3 (icalendar-first-weekday-of-year "MO" 2000)))
160 (assert (eq 1 (icalendar-first-weekday-of-year "TH" 1970))))
162 (defun icalendar-testsuite--test-datestring-to-isodate ()
163 "Test method for `icalendar--datestring-to-isodate'."
164 (let ((calendar-date-style 'iso
))
166 (assert (string= (icalendar--datestring-to-isodate "2008 05 11")
168 (assert (string= (icalendar--datestring-to-isodate "2008 05 31")
170 (assert (string= (icalendar--datestring-to-isodate "2008 05 31" 2)
174 (setq calendar-date-style
'european
)
175 (assert (string= (icalendar--datestring-to-isodate "11 05 2008")
177 (assert (string= (icalendar--datestring-to-isodate "31 05 2008")
179 (assert (string= (icalendar--datestring-to-isodate "31 05 2008" 2)
183 (setq calendar-date-style
'american
)
184 (assert (string= (icalendar--datestring-to-isodate "11 05 2008")
186 (assert (string= (icalendar--datestring-to-isodate "12 30 2008")
188 (assert (string= (icalendar--datestring-to-isodate "12 30 2008" 2)
192 (setq calendar-date-style nil
) ;not necessary for conversion
193 (assert (string= (icalendar--datestring-to-isodate "Nov 05 2008")
195 (assert (string= (icalendar--datestring-to-isodate "05 Nov 2008")
197 (assert (string= (icalendar--datestring-to-isodate "2008 Nov 05")
200 (defun icalendar-testsuite--test-datetime-to-diary-date ()
201 "Test method for `icalendar--datetime-to-diary-date'."
202 (let* ((datetime '(59 59 23 31 12 2008))
203 (calendar-date-style 'iso
))
204 (assert (string= (icalendar--datetime-to-diary-date datetime
)
206 (setq calendar-date-style
'european
)
207 (assert (string= (icalendar--datetime-to-diary-date datetime
)
209 (setq calendar-date-style
'american
)
210 (assert (string= (icalendar--datetime-to-diary-date datetime
)
213 (defun icalendar-testsuite--test-diarytime-to-isotime ()
214 "Test method for `icalendar--diarytime-to-isotime'."
215 (assert (string= (icalendar--diarytime-to-isotime "0100" "")
217 (assert (string= (icalendar--diarytime-to-isotime "0100" "am")
219 (assert (string= (icalendar--diarytime-to-isotime "0100" "pm")
221 (assert (string= (icalendar--diarytime-to-isotime "1200" "")
223 (assert (string= (icalendar--diarytime-to-isotime "17:17" "")
225 (assert (string= (icalendar--diarytime-to-isotime "1200" "am")
227 (assert (string= (icalendar--diarytime-to-isotime "1201" "am")
229 (assert (string= (icalendar--diarytime-to-isotime "1259" "am")
231 (assert (string= (icalendar--diarytime-to-isotime "1200" "pm")
233 (assert (string= (icalendar--diarytime-to-isotime "1201" "pm")
235 (assert (string= (icalendar--diarytime-to-isotime "1259" "pm")
238 (defun icalendar-testsuite--test-calendar-style ()
239 "Test method for `icalendar--date-style'."
240 (dolist (calendar-date-style '(iso american european
))
241 (assert (eq (icalendar--date-style) calendar-date-style
)))
242 (let ((cds calendar-date-style
)
243 (european-calendar-style t
))
244 (makunbound 'calendar-date-style
)
245 (assert (eq (icalendar--date-style) 'european
))
246 (with-no-warnings (setq european-calendar-style nil
)) ;still get warning!?! FIXME
247 (assert (eq (icalendar--date-style) 'american
))
248 (setq calendar-date-style cds
)))
250 (defun icalendar-testsuite--test-create-uid ()
251 "Test method for `icalendar--create-uid'."
252 (let* ((icalendar-uid-format "xxx-%t-%c-%h-%u-%s")
254 (icalendar--uid-count 77)
255 (entry-full "30.06.1964 07:01 blahblah")
256 (hash (format "%d" (abs (sxhash entry-full
))))
257 (contents "DTSTART:19640630T070100\nblahblah")
258 (username (or user-login-name
"UNKNOWN_USER"))
260 ;; FIXME! If a test fails 'current-time is screwed. FIXME!
261 (fset 't-ct
(symbol-function 'current-time
))
262 (fset 'current-time
(lambda () '(1 2 3)))
263 (assert (= 77 icalendar--uid-count
))
264 (assert (string= (concat "xxx-123-77-" hash
"-" username
"-19640630")
265 (icalendar--create-uid entry-full contents
)))
266 (assert (= 78 icalendar--uid-count
))
267 (fset 'current-time
(symbol-function 't-ct
))
269 (setq contents
"blahblah")
270 (setq icalendar-uid-format
"yyy%syyy")
271 (assert (string= (concat "yyyDTSTARTyyy")
272 (icalendar--create-uid entry-full contents
)))
276 ;; ======================================================================
277 ;; Test methods for exporting from diary to icalendar
278 ;; ======================================================================
280 (defun icalendar-testsuite--test-export (input-iso input-european input-american
282 "Perform an export test.
283 Argument INPUT-ISO iso style diary string.
284 Argument INPUT-EUROPEAN european style diary string.
285 Argument INPUT-AMERICAN american style diary string.
286 Argument EXPECTED-OUTPUT expected icalendar result string.
288 European style input data must use german month names. American
289 and ISO style input data must use english month names."
290 (message "--- icalendar-testsuite--test-export ---")
291 (let ((calendar-date-style 'iso
)
292 (icalendar-recurring-start-year 2000))
293 (set-time-zone-rule "CET") ;;FIXME: reset timezone!
295 (let ((calendar-month-name-array
296 ["January" "February" "March" "April" "May" "June" "July" "August"
297 "September" "October" "November" "December"])
298 (calendar-day-name-array
299 ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday"
301 (setq calendar-date-style
'iso
)
302 (icalendar-testsuite--do-test-export input-iso expected-output
)))
304 (let ((calendar-month-name-array
305 ["Januar" "Februar" "März" "April" "Mai" "Juni" "Juli" "August"
306 "September" "Oktober" "November" "Dezember"])
307 (calendar-day-name-array
308 ["Sonntag" "Montag" "Dienstag" "Mittwoch" "Donnerstag" "Freitag"
310 (setq calendar-date-style
'european
)
311 (icalendar-testsuite--do-test-export input-european expected-output
)))
313 (let ((calendar-month-name-array
314 ["January" "February" "March" "April" "May" "June" "July" "August"
315 "September" "October" "November" "December"])
316 (calendar-day-name-array
317 ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday"
319 (setq calendar-date-style
'american
)
320 (icalendar-testsuite--do-test-export input-american expected-output
)))))
322 (defun icalendar-testsuite--do-test-export (input expected-output
)
323 "Actually perform export test.
324 Argument INPUT input diary string.
325 Argument EXPECTED-OUTPUT expected icalendar result string."
326 (let ((temp-file (make-temp-file "icalendar-testsuite-ics")))
329 (icalendar-export-region (point-min) (point-max) temp-file
))
331 (find-file temp-file
)
332 (goto-char (point-min))
334 (cond (expected-output
335 (and (re-search-forward "^\\s-*BEGIN:VCALENDAR
336 PRODID:-//Emacs//NONSGML icalendar.el//EN
347 (regexp-quote (buffer-substring-no-properties
348 (match-beginning 1) (match-end 1)))
352 (re-search-forward "^\\s-*BEGIN:VCALENDAR
353 PRODID:-//Emacs//NONSGML icalendar.el//EN
359 "Export test failed! Input: `%s'\nFound:\n\n%s\n\nbut expected\n\n%s"
361 (or (and (match-beginning 1)
362 (buffer-substring-no-properties (match-beginning 1) (match-end 1)))
364 (or expected-output
"<nil>"))))
365 (kill-buffer (find-buffer-visiting temp-file
))
366 (delete-file temp-file
)))
368 ;; ======================================================================
369 ;; Test methods for importing from icalendar to diary
370 ;; ======================================================================
372 (defun icalendar-testsuite--test-import (input expected-iso expected-european
374 "Perform import test.
375 Argument INPUT icalendar event string.
376 Argument EXPECTED-ISO expected iso style diary string.
377 Argument EXPECTED-EUROPEAN expected european style diary string.
378 Argument EXPECTED-AMERICAN expected american style diary string."
379 (message "--- icalendar-testsuite--test-import ---")
380 (let ((timezone (cadr (current-time-zone))))
381 (set-time-zone-rule "CET")
383 (if (string-match "^BEGIN:VCALENDAR" input
)
385 (insert "BEGIN:VCALENDAR\nPRODID:-//Emacs//NONSGML icalendar.el//EN\n")
386 (insert "VERSION:2.0\nBEGIN:VEVENT\n")
388 (unless (eq (char-before) ?
\n)
390 (insert "END:VEVENT\nEND:VCALENDAR\n"))
391 (let ((icalendar-import-format "%s%d%l%o%t%u%c")
392 (icalendar-import-format-summary "%s")
393 (icalendar-import-format-location "\n Location: %s")
394 (icalendar-import-format-description "\n Desc: %s")
395 (icalendar-import-format-organizer "\n Organizer: %s")
396 (icalendar-import-format-status "\n Status: %s")
397 (icalendar-import-format-url "\n URL: %s")
398 (icalendar-import-format-class "\n Class: %s")
401 (setq calendar-date-style
'iso
)
402 (icalendar-testsuite--do-test-import input expected-iso
))
403 (when expected-european
404 (setq calendar-date-style
'european
)
405 (icalendar-testsuite--do-test-import input expected-european
))
406 (when expected-american
407 (setq calendar-date-style
'american
)
408 (icalendar-testsuite--do-test-import input expected-american
))))
409 (set-time-zone-rule timezone
)))
411 (defun icalendar-testsuite--do-test-import (input expected-output
)
412 "Actually perform import test.
413 Argument INPUT input icalendar string.
414 Argument EXPECTED-OUTPUT expected diary string."
415 (let ((temp-file (make-temp-file "icalendar-test-diary")))
416 (icalendar-import-buffer temp-file t t
)
418 (find-file temp-file
)
419 (let ((result (buffer-substring-no-properties (point-min) (point-max))))
420 (unless (string-match (concat "^\\s-*" expected-output
"\\s-*$")
422 (error "Import test failed! Found `%s'\nbut expected `%s'" result
424 (kill-buffer (find-buffer-visiting temp-file
))
425 (delete-file temp-file
))))
427 ;; ======================================================================
428 ;; Test methods for cycle...
429 ;; ======================================================================
430 (defun icalendar-testsuite--test-cycle (input)
432 Argument INPUT icalendar event string."
434 (if (string-match "^BEGIN:VCALENDAR" input
)
436 (insert "BEGIN:VCALENDAR\nPRODID:-//Emacs//NONSGML icalendar.el//EN\n")
437 (insert "VERSION:2.0\nBEGIN:VEVENT\n")
439 (unless (eq (char-before) ?
\n)
441 (insert "END:VEVENT\nEND:VCALENDAR\n"))
442 (let ((icalendar-import-format "%s%d%l%o%t%u%c")
443 (icalendar-import-format-summary "%s")
444 (icalendar-import-format-location "\n Location: %s")
445 (icalendar-import-format-description "\n Desc: %s")
446 (icalendar-import-format-organizer "\n Organizer: %s")
447 (icalendar-import-format-status "\n Status: %s")
448 (icalendar-import-format-url "\n URL: %s")
449 (icalendar-import-format-class "\n Class: %s"))
450 (dolist (calendar-date-style '(iso european american
))
451 (icalendar-testsuite--do-test-cycle)))))
453 (defun icalendar-testsuite--do-test-cycle ()
454 "Actually perform import/export cycle test."
455 (let ((temp-diary (make-temp-file "icalendar-test-diary"))
456 (temp-ics (make-temp-file "icalendar-test-ics"))
457 (org-input (buffer-substring-no-properties (point-min) (point-max))))
458 (icalendar-import-buffer temp-diary t t
)
460 (find-file temp-diary
)
461 (icalendar-export-region (point-min) (point-max) temp-ics
))
464 (goto-char (point-min))
465 (when (re-search-forward "\nUID:.*\n" nil t
)
466 (replace-match "\n"))
467 (let ((cycled (buffer-substring-no-properties (point-min) (point-max))))
468 (unless (string-equal org-input cycled
)
469 (error "Import test failed! Found `%s'\nbut expected `%s'" cycled
471 (kill-buffer (find-buffer-visiting temp-diary
))
473 (set-buffer (find-buffer-visiting temp-ics
))
474 (set-buffer-modified-p nil
)
475 (kill-buffer (current-buffer)))
476 (delete-file temp-diary
)
477 (delete-file temp-ics
)))
479 ;; ======================================================================
481 ;; ======================================================================
482 (defun icalendar-testsuite--run-import-tests ()
483 "Perform standard import tests."
484 (icalendar-testsuite--test-import
485 "SUMMARY:non-recurring
486 DTSTART;VALUE=DATE-TIME:20030919T090000
487 DTEND;VALUE=DATE-TIME:20030919T113000"
488 "&2003/9/19 09:00-11:30 non-recurring"
489 "&19/9/2003 09:00-11:30 non-recurring"
490 "&9/19/2003 09:00-11:30 non-recurring")
492 (icalendar-testsuite--test-import
493 "SUMMARY:non-recurring allday
494 DTSTART;VALUE=DATE-TIME:20030919"
495 "&2003/9/19 non-recurring allday"
496 "&19/9/2003 non-recurring allday"
497 "&9/19/2003 non-recurring allday")
499 (icalendar-testsuite--test-import
502 DTSTART;VALUE=DATE:20030919"
503 "&2003/9/19 long summary"
504 "&19/9/2003 long summary"
505 "&9/19/2003 long summary")
507 (icalendar-testsuite--test-import
508 "UID:748f2da0-0d9b-11d8-97af-b4ec8686ea61
512 X-MOZILLA-ALARM-DEFAULT-UNITS:Minuten
513 X-MOZILLA-RECUR-DEFAULT-INTERVAL:0
514 DTSTART;VALUE=DATE:20040719
515 DTEND;VALUE=DATE:20040828
516 DTSTAMP:20031103T011641Z
518 "&%%(and (diary-block 2004 7 19 2004 8 27)) Sommerferien"
519 "&%%(and (diary-block 19 7 2004 27 8 2004)) Sommerferien"
520 "&%%(and (diary-block 7 19 2004 8 27 2004)) Sommerferien")
522 (icalendar-testsuite--test-import
524 :04979712-3902-11d9-93dd-8f9f4afe08da
531 X-MOZILLA-ALARM-DEFAULT-LENGTH
542 "&2004/11/23 14:00-14:30 folded summary"
543 "&23/11/2004 14:00-14:30 folded summary"
544 "&11/23/2004 14:00-14:30 folded summary")
545 (icalendar-testsuite--test-import
547 :6161a312-3902-11d9-b512-f764153bb28b
554 X-MOZILLA-ALARM-DEFAULT-LENGTH
563 "&2004/11/23 14:45-15:45 another example"
564 "&23/11/2004 14:45-15:45 another example"
565 "&11/23/2004 14:45-15:45 another example")
567 (icalendar-testsuite--test-import
569 DTSTART;VALUE=DATE-TIME:20030919T090000
570 DTEND;VALUE=DATE-TIME:20030919T113000
573 "&%%(and (diary-cyclic 1 2003 9 19)) 09:00-11:30 rrule daily"
574 "&%%(and (diary-cyclic 1 19 9 2003)) 09:00-11:30 rrule daily"
575 "&%%(and (diary-cyclic 1 9 19 2003)) 09:00-11:30 rrule daily")
578 (icalendar-testsuite--test-import
580 DTSTART;VALUE=DATE-TIME:20030919T090000
581 DTEND;VALUE=DATE-TIME:20030919T113000
582 RRULE:FREQ=DAILY;INTERVAL=2
584 "&%%(and (diary-cyclic 2 2003 9 19)) 09:00-11:30 rrule daily"
585 "&%%(and (diary-cyclic 2 19 9 2003)) 09:00-11:30 rrule daily"
586 "&%%(and (diary-cyclic 2 9 19 2003)) 09:00-11:30 rrule daily")
587 (icalendar-testsuite--test-import
588 "SUMMARY:rrule daily with exceptions
589 DTSTART;VALUE=DATE-TIME:20030919T090000
590 DTEND;VALUE=DATE-TIME:20030919T113000
591 RRULE:FREQ=DAILY;INTERVAL=2
592 EXDATE:20030921,20030925
594 "&%%(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"
595 "&%%(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"
596 "&%%(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")
598 (icalendar-testsuite--test-import
599 "SUMMARY:rrule weekly
600 DTSTART;VALUE=DATE-TIME:20030919T090000
601 DTEND;VALUE=DATE-TIME:20030919T113000
604 "&%%(and (diary-cyclic 7 2003 9 19)) 09:00-11:30 rrule weekly"
605 "&%%(and (diary-cyclic 7 19 9 2003)) 09:00-11:30 rrule weekly"
606 "&%%(and (diary-cyclic 7 9 19 2003)) 09:00-11:30 rrule weekly")
607 (icalendar-testsuite--test-import
608 "SUMMARY:rrule monthly no end
609 DTSTART;VALUE=DATE-TIME:20030919T090000
610 DTEND;VALUE=DATE-TIME:20030919T113000
613 "&%%(and (diary-date t t 19) (diary-block 2003 9 19 9999 1 1)) 09:00-11:30 rrule monthly no end"
614 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 1 1 9999)) 09:00-11:30 rrule monthly no end"
615 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 1 1 9999)) 09:00-11:30 rrule monthly no end")
616 (icalendar-testsuite--test-import
617 "SUMMARY:rrule monthly with end
618 DTSTART;VALUE=DATE-TIME:20030919T090000
619 DTEND;VALUE=DATE-TIME:20030919T113000
620 RRULE:FREQ=MONTHLY;UNTIL=20050819;
622 "&%%(and (diary-date t t 19) (diary-block 2003 9 19 2005 8 19)) 09:00-11:30 rrule monthly with end"
623 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 8 2005)) 09:00-11:30 rrule monthly with end"
624 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 8 19 2005)) 09:00-11:30 rrule monthly with end")
625 (icalendar-testsuite--test-import
626 "DTSTART;VALUE=DATE:20040815
627 DTEND;VALUE=DATE:20040816
628 SUMMARY:Maria Himmelfahrt
629 UID:CC56BEA6-49D2-11D8-8833-00039386D1C2-RID
630 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=8
632 "&%%(and (diary-anniversary 2004 8 15)) Maria Himmelfahrt"
633 "&%%(and (diary-anniversary 15 8 2004)) Maria Himmelfahrt"
634 "&%%(and (diary-anniversary 8 15 2004)) Maria Himmelfahrt")
635 (icalendar-testsuite--test-import
636 "SUMMARY:rrule yearly
637 DTSTART;VALUE=DATE-TIME:20030919T090000
638 DTEND;VALUE=DATE-TIME:20030919T113000
639 RRULE:FREQ=YEARLY;INTERVAL=2
641 "&%%(and (diary-anniversary 2003 9 19)) 09:00-11:30 rrule yearly" ;FIXME
642 "&%%(and (diary-anniversary 19 9 2003)) 09:00-11:30 rrule yearly" ;FIXME
643 "&%%(and (diary-anniversary 9 19 2003)) 09:00-11:30 rrule yearly") ;FIXME
644 (icalendar-testsuite--test-import
645 "SUMMARY:rrule count daily short
646 DTSTART;VALUE=DATE-TIME:20030919T090000
647 DTEND;VALUE=DATE-TIME:20030919T113000
648 RRULE:FREQ=DAILY;COUNT=1;INTERVAL=1
650 "&%%(and (diary-cyclic 1 2003 9 19) (diary-block 2003 9 19 2003 9 19)) 09:00-11:30 rrule count daily short"
651 "&%%(and (diary-cyclic 1 19 9 2003) (diary-block 19 9 2003 19 9 2003)) 09:00-11:30 rrule count daily short"
652 "&%%(and (diary-cyclic 1 9 19 2003) (diary-block 9 19 2003 9 19 2003)) 09:00-11:30 rrule count daily short")
653 (icalendar-testsuite--test-import
654 "SUMMARY:rrule count daily long
655 DTSTART;VALUE=DATE-TIME:20030919T090000
656 DTEND;VALUE=DATE-TIME:20030919T113000
657 RRULE:FREQ=DAILY;COUNT=14;INTERVAL=1
659 "&%%(and (diary-cyclic 1 2003 9 19) (diary-block 2003 9 19 2003 10 2)) 09:00-11:30 rrule count daily long"
660 "&%%(and (diary-cyclic 1 19 9 2003) (diary-block 19 9 2003 2 10 2003)) 09:00-11:30 rrule count daily long"
661 "&%%(and (diary-cyclic 1 9 19 2003) (diary-block 9 19 2003 10 2 2003)) 09:00-11:30 rrule count daily long")
662 (icalendar-testsuite--test-import
663 "SUMMARY:rrule count bi-weekly 3 times
664 DTSTART;VALUE=DATE-TIME:20030919T090000
665 DTEND;VALUE=DATE-TIME:20030919T113000
666 RRULE:FREQ=WEEKLY;COUNT=3;INTERVAL=2
668 "&%%(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"
669 "&%%(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"
670 "&%%(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")
671 (icalendar-testsuite--test-import
672 "SUMMARY:rrule count monthly
673 DTSTART;VALUE=DATE-TIME:20030919T090000
674 DTEND;VALUE=DATE-TIME:20030919T113000
675 RRULE:FREQ=MONTHLY;INTERVAL=1;COUNT=5
677 "&%%(and (diary-date t t 19) (diary-block 2003 9 19 2004 1 19)) 09:00-11:30 rrule count monthly"
678 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 1 2004)) 09:00-11:30 rrule count monthly"
679 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 1 19 2004)) 09:00-11:30 rrule count monthly")
680 (icalendar-testsuite--test-import
681 "SUMMARY:rrule count every second month
682 DTSTART;VALUE=DATE-TIME:20030919T090000
683 DTEND;VALUE=DATE-TIME:20030919T113000
684 RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=5
686 "&%%(and (diary-date t t 19) (diary-block 2003 9 19 2004 5 19)) 09:00-11:30 rrule count every second month" ;FIXME
687 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 5 2004)) 09:00-11:30 rrule count every second month" ;FIXME
688 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 5 19 2004)) 09:00-11:30 rrule count every second month") ;FIXME
689 (icalendar-testsuite--test-import
690 "SUMMARY:rrule count yearly
691 DTSTART;VALUE=DATE-TIME:20030919T090000
692 DTEND;VALUE=DATE-TIME:20030919T113000
693 RRULE:FREQ=YEARLY;INTERVAL=1;COUNT=5
695 "&%%(and (diary-date t 9 19) (diary-block 2003 9 19 2007 9 19)) 09:00-11:30 rrule count yearly"
696 "&%%(and (diary-date 19 9 t) (diary-block 19 9 2003 19 9 2007)) 09:00-11:30 rrule count yearly"
697 "&%%(and (diary-date 9 19 t) (diary-block 9 19 2003 9 19 2007)) 09:00-11:30 rrule count yearly")
698 (icalendar-testsuite--test-import
699 "SUMMARY:rrule count every second year
700 DTSTART;VALUE=DATE-TIME:20030919T090000
701 DTEND;VALUE=DATE-TIME:20030919T113000
702 RRULE:FREQ=YEARLY;INTERVAL=2;COUNT=5
704 "&%%(and (diary-date t 9 19) (diary-block 2003 9 19 2011 9 19)) 09:00-11:30 rrule count every second year" ;FIXME!!!
705 "&%%(and (diary-date 19 9 t) (diary-block 19 9 2003 19 9 2011)) 09:00-11:30 rrule count every second year" ;FIXME!!!
706 "&%%(and (diary-date 9 19 t) (diary-block 9 19 2003 9 19 2011)) 09:00-11:30 rrule count every second year") ;FIXME!!!
709 (icalendar-testsuite--test-import
710 "DTSTART;VALUE=DATE:20050217
714 "&%%(and (diary-block 2005 2 17 2005 2 23)) duration"
715 "&%%(and (diary-block 17 2 2005 23 2 2005)) duration"
716 "&%%(and (diary-block 2 17 2005 2 23 2005)) duration")
718 (icalendar-testsuite--test-import
719 "UID:20041127T183329Z-18215-1001-4536-49109@andromeda
720 DTSTAMP:20041127T183315Z
721 LAST-MODIFIED:20041127T183329
723 DTSTART;VALUE=DATE:20011221
724 DTEND;VALUE=DATE:20011221
725 RRULE:FREQ=DAILY;UNTIL=20011229;INTERVAL=1;WKST=SU
728 CREATED:20041127T183329
730 "&%%(and (diary-cyclic 1 2001 12 21) (diary-block 2001 12 21 2001 12 29)) Urlaub"
731 "&%%(and (diary-cyclic 1 21 12 2001) (diary-block 21 12 2001 29 12 2001)) Urlaub"
732 "&%%(and (diary-cyclic 1 12 21 2001) (diary-block 12 21 2001 12 29 2001)) Urlaub")
735 ;; ======================================================================
737 ;; ======================================================================
738 (defun icalendar-testsuite--run-export-tests ()
739 "Perform standard export tests."
741 (let ((icalendar-export-hidden-diary-entries nil
))
742 (icalendar-testsuite--test-export
743 "&2000 Oct 3 ordinary no time "
744 "&3 Okt 2000 ordinary no time "
745 "&Oct 3 2000 ordinary no time "
749 (icalendar-testsuite--test-export
750 "2000 Oct 3 ordinary no time "
751 "3 Okt 2000 ordinary no time "
752 "Oct 3 2000 ordinary no time "
753 "DTSTART;VALUE=DATE:20001003
754 DTEND;VALUE=DATE:20001004
755 SUMMARY:ordinary no time
757 (icalendar-testsuite--test-export
758 "2000 Oct 3 16:30 ordinary with time"
759 "3 Okt 2000 16:30 ordinary with time"
760 "Oct 3 2000 16:30 ordinary with time"
761 "DTSTART;VALUE=DATE-TIME:20001003T163000
762 DTEND;VALUE=DATE-TIME:20001003T173000
763 SUMMARY:ordinary with time
765 (icalendar-testsuite--test-export
766 "2000 10 3 16:30 ordinary with time 2"
767 "3 10 2000 16:30 ordinary with time 2"
768 "10 3 2000 16:30 ordinary with time 2"
769 "DTSTART;VALUE=DATE-TIME:20001003T163000
770 DTEND;VALUE=DATE-TIME:20001003T173000
771 SUMMARY:ordinary with time 2
774 (icalendar-testsuite--test-export
775 "2000/10/3 16:30 ordinary with time 3"
776 "3/10/2000 16:30 ordinary with time 3"
777 "10/3/2000 16:30 ordinary with time 3"
778 "DTSTART;VALUE=DATE-TIME:20001003T163000
779 DTEND;VALUE=DATE-TIME:20001003T173000
780 SUMMARY:ordinary with time 3
783 ;; multiline -- FIXME!!!
784 (icalendar-testsuite--test-export
785 "2000 October 3 16:30 multiline
786 17:30 multiline continued FIXME"
787 "3 Oktober 2000 16:30 multiline
788 17:30 multiline continued FIXME"
789 "October 3 2000 16:30 multiline
790 17:30 multiline continued FIXME"
791 "DTSTART;VALUE=DATE-TIME:20001003T163000
792 DTEND;VALUE=DATE-TIME:20001003T173000
795 17:30 multiline continued FIXME
799 (icalendar-testsuite--test-export
800 "Monday 1:30pm weekly by day with start time"
801 "Montag 13:30 weekly by day with start time"
802 "Monday 1:30pm weekly by day with start time"
803 "DTSTART;VALUE=DATE-TIME:20000103T133000
804 DTEND;VALUE=DATE-TIME:20000103T143000
805 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO
806 SUMMARY:weekly by day with start time
809 (icalendar-testsuite--test-export
810 "Monday 13:30-15:00 weekly by day with start and end time"
811 "Montag 13:30-15:00 weekly by day with start and end time"
812 "Monday 01:30pm-03:00pm weekly by day with start and end time"
813 "DTSTART;VALUE=DATE-TIME:20000103T133000
814 DTEND;VALUE=DATE-TIME:20000103T150000
815 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO
816 SUMMARY:weekly by day with start and end time
820 (icalendar-testsuite--test-export
821 "may 1 yearly no time"
822 "1 Mai yearly no time"
823 "may 1 yearly no time"
824 "DTSTART;VALUE=DATE:19000501
825 DTEND;VALUE=DATE:19000502
826 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=5;BYMONTHDAY=1
827 SUMMARY:yearly no time
831 (icalendar-testsuite--test-export
832 "%%(diary-anniversary 1989 10 3) anniversary no time"
833 "%%(diary-anniversary 3 10 1989) anniversary no time"
834 "%%(diary-anniversary 10 3 1989) anniversary no time"
835 "DTSTART;VALUE=DATE:19891003
836 DTEND;VALUE=DATE:19891004
837 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=10;BYMONTHDAY=03
838 SUMMARY:anniversary no time
840 (icalendar-testsuite--test-export
841 "%%(diary-anniversary 1989 10 3) 19:00-20:00 anniversary with time"
842 "%%(diary-anniversary 3 10 1989) 19:00-20:00 anniversary with time"
843 "%%(diary-anniversary 10 3 1989) 19:00-20:00 anniversary with time"
844 "DTSTART;VALUE=DATE-TIME:19891003T190000
845 DTEND;VALUE=DATE-TIME:19891004T200000
846 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=10;BYMONTHDAY=03
847 SUMMARY:anniversary with time
851 (icalendar-testsuite--test-export
852 "%%(diary-block 2001 6 18 2001 7 6) block no time"
853 "%%(diary-block 18 6 2001 6 7 2001) block no time"
854 "%%(diary-block 6 18 2001 7 6 2001) block no time"
855 "DTSTART;VALUE=DATE:20010618
856 DTEND;VALUE=DATE:20010707
857 SUMMARY:block no time
859 (icalendar-testsuite--test-export
860 "%%(diary-block 2001 6 18 2001 7 6) 13:00-17:00 block with time"
861 "%%(diary-block 18 6 2001 6 7 2001) 13:00-17:00 block with time"
862 "%%(diary-block 6 18 2001 7 6 2001) 13:00-17:00 block with time"
863 "DTSTART;VALUE=DATE-TIME:20010618T130000
864 DTEND;VALUE=DATE-TIME:20010618T170000
865 RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20010706
866 SUMMARY:block with time
868 (icalendar-testsuite--test-export
869 "%%(diary-block 2001 6 18 2001 7 6) 13:00 block no end time"
870 "%%(diary-block 18 6 2001 6 7 2001) 13:00 block no end time"
871 "%%(diary-block 6 18 2001 7 6 2001) 13:00 block no end time"
872 "DTSTART;VALUE=DATE-TIME:20010618T130000
873 DTEND;VALUE=DATE-TIME:20010618T140000
874 RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20010706
875 SUMMARY:block no end time
879 ;; ======================================================================
881 ;; ======================================================================
882 (defun icalendar-testsuite--run-real-world-tests ()
883 "Perform real-world tests, as gathered from problem reports."
885 (icalendar-testsuite--test-import
888 PRODID:Microsoft CDO for Microsoft Exchange
891 TZID:Kolkata\, Chennai\, Mumbai\, New Delhi
892 X-MICROSOFT-CDO-TZID:23
894 DTSTART:16010101T000000
899 DTSTART:16010101T000000
905 DTSTAMP:20030509T043439Z
906 DTSTART;TZID=\"Kolkata, Chennai, Mumbai, New Delhi\":20030509T103000
907 SUMMARY:On-Site Interview
908 UID:040000008200E00074C5B7101A82E0080000000080B6DE661216C301000000000000000
909 010000000DB823520692542408ED02D7023F9DFF9
910 ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=\"Xxxxx
911 xxx Xxxxxxxxxxxx\":MAILTO:xxxxxxxx@xxxxxxx.com
912 ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=\"Yyyyyyy Y
913 yyyy\":MAILTO:yyyyyyy@yyyyyyy.com
914 ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=\"Zzzz Zzzz
915 zz\":MAILTO:zzzzzz@zzzzzzz.com
916 ORGANIZER;CN=\"Aaaaaa Aaaaa\":MAILTO:aaaaaaa@aaaaaaa.com
918 DTEND;TZID=\"Kolkata, Chennai, Mumbai, New Delhi\":20030509T153000
919 DESCRIPTION:10:30am - Blah
923 CREATED:20030509T043439Z
924 LAST-MODIFIED:20030509T043459Z
927 X-MICROSOFT-CDO-BUSYSTATUS:BUSY
928 X-MICROSOFT-CDO-INSTTYPE:0
929 X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
930 X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
931 X-MICROSOFT-CDO-IMPORTANCE:1
932 X-MICROSOFT-CDO-OWNERAPPTID:126441427
936 TRIGGER;RELATED=START:-PT00H15M00S
941 "&9/5/2003 10:30-15:30 On-Site Interview
944 Organizer: MAILTO:aaaaaaa@aaaaaaa.com"
945 "&5/9/2003 10:30-15:30 On-Site Interview
948 Organizer: MAILTO:aaaaaaa@aaaaaaa.com")
951 (icalendar-testsuite--test-import
952 "DTSTAMP:20030618T195512Z
953 DTSTART;TZID=\"Mountain Time (US & Canada)\":20030623T110000
954 SUMMARY:Dress Rehearsal for XXXX-XXXX
955 UID:040000008200E00074C5B7101A82E00800000000608AA7DA9835C301000000000000000
956 0100000007C3A6D65EE726E40B7F3D69A23BD567E
957 ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=\"AAAAA,AAA
958 AA (A-AAAAAAA,ex1)\":MAILTO:aaaaa_aaaaa@aaaaa.com
959 ORGANIZER;CN=\"ABCD,TECHTRAINING
960 (A-Americas,exgen1)\":MAILTO:xxx@xxxxx.com
961 LOCATION:555 or TN 555-5555 ID 5555 & NochWas (see below)
962 DTEND;TZID=\"Mountain Time (US & Canada)\":20030623T120000
963 DESCRIPTION:753 Zeichen hier radiert
967 CREATED:20030618T195518Z
968 LAST-MODIFIED:20030618T195527Z
971 X-MICROSOFT-CDO-BUSYSTATUS:BUSY
972 X-MICROSOFT-CDO-INSTTYPE:0
973 X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
974 X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
975 X-MICROSOFT-CDO-IMPORTANCE:1
976 X-MICROSOFT-CDO-OWNERAPPTID:1022519251
980 TRIGGER;RELATED=START:-PT00H15M00S
983 "&23/6/2003 11:00-12:00 Dress Rehearsal for XXXX-XXXX
984 Desc: 753 Zeichen hier radiert
985 Location: 555 or TN 555-5555 ID 5555 & NochWas (see below)
986 Organizer: MAILTO:xxx@xxxxx.com"
987 "&6/23/2003 11:00-12:00 Dress Rehearsal for XXXX-XXXX
988 Desc: 753 Zeichen hier radiert
989 Location: 555 or TN 555-5555 ID 5555 & NochWas (see below)
990 Organizer: MAILTO:xxx@xxxxx.com")
992 ;; 2003-06-18 b -- uses timezone
993 (icalendar-testsuite--test-import
996 PRODID:Microsoft CDO for Microsoft Exchange
999 TZID:Mountain Time (US & Canada)
1000 X-MICROSOFT-CDO-TZID:12
1002 DTSTART:16010101T020000
1005 RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
1008 DTSTART:16010101T020000
1011 RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=4;BYDAY=1SU
1015 DTSTAMP:20030618T230323Z
1016 DTSTART;TZID=\"Mountain Time (US & Canada)\":20030623T090000
1017 SUMMARY:Updated: Dress Rehearsal for ABC01-15
1018 UID:040000008200E00074C5B7101A82E00800000000608AA7DA9835C301000000000000000
1019 0100000007C3A6D65EE726E40B7F3D69A23BD567E
1020 ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;X-REPLYTIME=20030618T20
1021 0700Z;RSVP=TRUE;CN=\"AAAAA,AAAAAA
1022 \(A-AAAAAAA,ex1)\":MAILTO:aaaaaa_aaaaa@aaaaa
1024 ORGANIZER;CN=\"ABCD,TECHTRAINING
1025 \(A-Americas,exgen1)\":MAILTO:bbb@bbbbb.com
1026 LOCATION:123 or TN 123-1234 ID abcd & SonstWo (see below)
1027 DTEND;TZID=\"Mountain Time (US & Canada)\":20030623T100000
1028 DESCRIPTION:Viele Zeichen standen hier früher
1032 CREATED:20030618T230326Z
1033 LAST-MODIFIED:20030618T230335Z
1036 X-MICROSOFT-CDO-BUSYSTATUS:BUSY
1037 X-MICROSOFT-CDO-INSTTYPE:0
1038 X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
1039 X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
1040 X-MICROSOFT-CDO-IMPORTANCE:1
1041 X-MICROSOFT-CDO-OWNERAPPTID:1022519251
1044 DESCRIPTION:REMINDER
1045 TRIGGER;RELATED=START:-PT00H15M00S
1050 "&23/6/2003 17:00-18:00 Updated: Dress Rehearsal for ABC01-15
1051 Desc: Viele Zeichen standen hier früher
1052 Location: 123 or TN 123-1234 ID abcd & SonstWo (see below)
1053 Organizer: MAILTO:bbb@bbbbb.com
1055 "&6/23/2003 17:00-18:00 Updated: Dress Rehearsal for ABC01-15
1056 Desc: Viele Zeichen standen hier früher
1057 Location: 123 or TN 123-1234 ID abcd & SonstWo (see below)
1058 Organizer: MAILTO:bbb@bbbbb.com
1061 ;; export 2004-10-28 block entries
1062 (icalendar-testsuite--test-export
1065 "-*- mode: text; fill-column: 256;-*-
1069 %%(diary-block 11 8 2004 11 10 2004) Nov 8-10 aa
1071 "DTSTART;VALUE=DATE:20041108
1072 DTEND;VALUE=DATE:20041111
1073 SUMMARY:Nov 8-10 aa")
1075 (icalendar-testsuite--test-export
1078 "%%(diary-block 12 13 2004 12 17 2004) Dec 13-17 bb"
1079 "DTSTART;VALUE=DATE:20041213
1080 DTEND;VALUE=DATE:20041218
1081 SUMMARY:Dec 13-17 bb")
1083 (icalendar-testsuite--test-export
1086 "%%(diary-block 2 3 2005 2 4 2005) Feb 3-4 cc"
1087 "DTSTART;VALUE=DATE:20050203
1088 DTEND;VALUE=DATE:20050205
1089 SUMMARY:Feb 3-4 cc")
1091 (icalendar-testsuite--test-export
1094 "%%(diary-block 4 24 2005 4 29 2005) April 24-29 dd"
1095 "DTSTART;VALUE=DATE:20050424
1096 DTEND;VALUE=DATE:20050430
1097 SUMMARY:April 24-29 dd
1099 (icalendar-testsuite--test-export
1102 "%%(diary-block 5 30 2005 6 1 2005) may 30 - June 1: ee"
1103 "DTSTART;VALUE=DATE:20050530
1104 DTEND;VALUE=DATE:20050602
1105 SUMMARY:may 30 - June 1: ee")
1107 (icalendar-testsuite--test-export
1110 "%%(diary-block 6 6 2005 6 8 2005) ff"
1111 "DTSTART;VALUE=DATE:20050606
1112 DTEND;VALUE=DATE:20050609
1115 ;; export 2004-10-28 anniversary entries
1116 (icalendar-testsuite--test-export
1122 %%(diary-anniversary 3 28 1991) aa birthday (%d years old)"
1123 "DTSTART;VALUE=DATE:19910328
1124 DTEND;VALUE=DATE:19910329
1125 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=03;BYMONTHDAY=28
1126 SUMMARY:aa birthday (%d years old)
1129 (icalendar-testsuite--test-export
1132 "%%(diary-anniversary 5 17 1957) bb birthday (%d years old)"
1133 "DTSTART;VALUE=DATE:19570517
1134 DTEND;VALUE=DATE:19570518
1135 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=05;BYMONTHDAY=17
1136 SUMMARY:bb birthday (%d years old)")
1138 (icalendar-testsuite--test-export
1141 "%%(diary-anniversary 6 8 1997) cc birthday (%d years old)"
1142 "DTSTART;VALUE=DATE:19970608
1143 DTEND;VALUE=DATE:19970609
1144 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=06;BYMONTHDAY=08
1145 SUMMARY:cc birthday (%d years old)")
1147 (icalendar-testsuite--test-export
1150 "%%(diary-anniversary 7 22 1983) dd (%d years ago...!)"
1151 "DTSTART;VALUE=DATE:19830722
1152 DTEND;VALUE=DATE:19830723
1153 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=07;BYMONTHDAY=22
1154 SUMMARY:dd (%d years ago...!)")
1156 (icalendar-testsuite--test-export
1159 "%%(diary-anniversary 8 1 1988) ee birthday (%d years old)"
1160 "DTSTART;VALUE=DATE:19880801
1161 DTEND;VALUE=DATE:19880802
1162 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=08;BYMONTHDAY=01
1163 SUMMARY:ee birthday (%d years old)")
1165 (icalendar-testsuite--test-export
1168 "%%(diary-anniversary 9 21 1957) ff birthday (%d years old)"
1169 "DTSTART;VALUE=DATE:19570921
1170 DTEND;VALUE=DATE:19570922
1171 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=09;BYMONTHDAY=21
1172 SUMMARY:ff birthday (%d years old)")
1177 ;; export 2004-10-28 monthly, weekly entries
1179 ;; (icalendar-testsuite--test-export
1182 ;; >>> ------------ monthly:
1184 ;; */27/* 10:00 blah blah"
1187 (icalendar-testsuite--test-export
1190 ">>> ------------ my week:
1193 "DTSTART;VALUE=DATE-TIME:20000103T130000
1194 DTEND;VALUE=DATE-TIME:20000103T140000
1195 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO
1198 (icalendar-testsuite--test-export
1202 "DTSTART;VALUE=DATE-TIME:20000103T150000
1203 DTEND;VALUE=DATE-TIME:20000103T160000
1204 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO
1208 (icalendar-testsuite--test-export
1211 "Monday 16:00-17:00 a2"
1212 "DTSTART;VALUE=DATE-TIME:20000103T160000
1213 DTEND;VALUE=DATE-TIME:20000103T170000
1214 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO
1217 (icalendar-testsuite--test-export
1220 "Tuesday 11:30-13:00 a3"
1221 "DTSTART;VALUE=DATE-TIME:20000104T113000
1222 DTEND;VALUE=DATE-TIME:20000104T130000
1223 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=TU
1226 (icalendar-testsuite--test-export
1230 "DTSTART;VALUE=DATE-TIME:20000104T150000
1231 DTEND;VALUE=DATE-TIME:20000104T160000
1232 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=TU
1235 (icalendar-testsuite--test-export
1238 "Wednesday 13:00 a5"
1239 "DTSTART;VALUE=DATE-TIME:20000105T130000
1240 DTEND;VALUE=DATE-TIME:20000105T140000
1241 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=WE
1244 (icalendar-testsuite--test-export
1247 "Wednesday 11:30-13:30 a6"
1248 "DTSTART;VALUE=DATE-TIME:20000105T113000
1249 DTEND;VALUE=DATE-TIME:20000105T133000
1250 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=WE
1253 (icalendar-testsuite--test-export
1256 "Wednesday 15:00 s1"
1257 "DTSTART;VALUE=DATE-TIME:20000105T150000
1258 DTEND;VALUE=DATE-TIME:20000105T160000
1259 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=WE
1263 ;; export 2004-10-28 regular entries
1264 (icalendar-testsuite--test-export
1268 >>> regular diary entries:
1270 Oct 12 2004, 14:00 Tue: [2004-10-12] q1"
1271 "DTSTART;VALUE=DATE-TIME:20041012T140000
1272 DTEND;VALUE=DATE-TIME:20041012T150000
1273 SUMMARY:Tue: [2004-10-12] q1")
1276 (icalendar-testsuite--test-import
1281 :-//Mozilla.org/NONSGML Mozilla Calendar V1.0//EN
1284 :04979712-3902-11d9-93dd-8f9f4afe08da
1291 X-MOZILLA-ALARM-DEFAULT-LENGTH
1304 :6161a312-3902-11d9-b512-f764153bb28b
1311 X-MOZILLA-ALARM-DEFAULT-LENGTH
1322 :943a4d7e-3902-11d9-9ce7-c9addeadf928
1329 X-MOZILLA-ALARM-DEFAULT-LENGTH
1340 :fe53615e-3902-11d9-9dd8-9d38a155bf41
1347 X-MOZILLA-ALARM-DEFAULT-LENGTH
1349 X-MOZILLA-RECUR-DEFAULT-INTERVAL
1352 :FREQ=WEEKLY;INTERVAL=2;BYDAY=FR
1362 :87c928ee-3901-11d9-b21f-b45042155024
1364 :Rrrr/Cccccc ii Aaaaaaaa
1366 :Vvvvv Rrrr aaa Cccccc
1371 X-MOZILLA-ALARM-DEFAULT-LENGTH
1386 :e8f331ae-3902-11d9-9948-dfdcb66a2872
1393 X-MOZILLA-ALARM-DEFAULT-LENGTH
1396 :FREQ=WEEKLY;INTERVAL=1;BYDAY=MO
1411 "&23/11/2004 14:00-14:30 Jjjjj & Wwwww
1414 &23/11/2004 14:45-15:45 BB Aaaaaaaa Bbbbb
1417 &23/11/2004 11:00-12:00 Hhhhhhhh
1420 &%%(and (diary-cyclic 14 12 11 2004)) 14:00-18:30 MMM Aaaaaaaaa
1423 &%%(and (diary-block 19 11 2004 19 11 2004)) Rrrr/Cccccc ii Aaaaaaaa
1424 Desc: Vvvvv Rrrr aaa Cccccc
1427 &%%(and (diary-cyclic 7 1 11 2004)) Wwww aa hhhh
1430 "&11/23/2004 14:00-14:30 Jjjjj & Wwwww
1433 &11/23/2004 14:45-15:45 BB Aaaaaaaa Bbbbb
1436 &11/23/2004 11:00-12:00 Hhhhhhhh
1439 &%%(and (diary-cyclic 14 11 12 2004)) 14:00-18:30 MMM Aaaaaaaaa
1442 &%%(and (diary-block 11 19 2004 11 19 2004)) Rrrr/Cccccc ii Aaaaaaaa
1443 Desc: Vvvvv Rrrr aaa Cccccc
1446 &%%(and (diary-cyclic 7 11 1 2004)) Wwww aa hhhh
1451 (icalendar-testsuite--test-export
1452 "%%(diary-block 1 1 2004 4 1 2004) Urlaub"
1455 "DTSTART;VALUE=DATE:20040101
1456 DTEND;VALUE=DATE:20040105
1460 (icalendar-testsuite--test-export
1462 "5 11 2004 Bla Fasel"
1464 "DTSTART;VALUE=DATE:20041105
1465 DTEND;VALUE=DATE:20041106
1469 (icalendar-testsuite--test-export
1471 "2 Nov 2004 15:00-16:30 Zahnarzt"
1473 "DTSTART;VALUE=DATE-TIME:20041102T150000
1474 DTEND;VALUE=DATE-TIME:20041102T163000
1478 (icalendar-testsuite--test-import
1480 :b60d398e-1dd1-11b2-a159-cf8cb05139f4
1500 "&%%(and (diary-block 6 2 2005 6 2 2005)) Waitangi Day
1502 "&%%(and (diary-block 2 6 2005 2 6 2005)) Waitangi Day
1506 (icalendar-testsuite--test-import
1507 "DTSTART;VALUE=DATE:20050217
1508 SUMMARY:Hhhhhh Aaaaa ii Aaaaaaaa
1509 UID:6AFA7558-6994-11D9-8A3A-000A95A0E830-RID
1510 DTSTAMP:20050118T210335Z
1513 "&%%(and (diary-block 17 2 2005 23 2 2005)) Hhhhhh Aaaaa ii Aaaaaaaa"
1514 "&%%(and (diary-block 2 17 2005 2 23 2005)) Hhhhhh Aaaaa ii Aaaaaaaa")
1517 (icalendar-testsuite--test-export
1519 "&%%(diary-cyclic 7 8 2 2005) 16:00-16:45 [WORK] Pppp"
1521 "DTSTART;VALUE=DATE-TIME:20050208T160000
1522 DTEND;VALUE=DATE-TIME:20050208T164500
1523 RRULE:FREQ=DAILY;INTERVAL=7
1528 (icalendar-testsuite--test-export
1531 ;; FIXME: colon not allowed!
1532 ;;"Nov 1: NNN Wwwwwwww Wwwww - Aaaaaa Pppppppp rrrrrr ddd oo Nnnnnnnn 30"
1533 "Nov 1 NNN Wwwwwwww Wwwww - Aaaaaa Pppppppp rrrrrr ddd oo Nnnnnnnn 30"
1534 "DTSTART;VALUE=DATE:19001101
1535 DTEND;VALUE=DATE:19001102
1536 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=11;BYMONTHDAY=1
1537 SUMMARY:NNN Wwwwwwww Wwwww - Aaaaaa Pppppppp rrrrrr ddd oo Nnnnnnnn 30
1541 (defun icalendar-testsuite--run-cycle-tests ()
1542 "Perform cycling tests."
1543 (icalendar-testsuite--test-cycle
1544 "DTSTART;VALUE=DATE-TIME:20030919T090000
1545 DTEND;VALUE=DATE-TIME:20030919T113000
1549 (icalendar-testsuite--test-cycle
1550 "DTSTART;VALUE=DATE-TIME:20030919T090000
1551 DTEND;VALUE=DATE-TIME:20030919T113000
1553 DESCRIPTION:beschreibung!
1558 ;; FIXME: does not work
1559 ;; (icalendar-testsuite--test-cycle
1560 ;; "DTSTART;VALUE=DATE:19190909
1561 ;;DTEND;VALUE=DATE:19190910
1562 ;;RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=09;BYMONTHDAY=09
1563 ;;SUMMARY:and diary-anniversary
1568 (provide 'icalendar-testsuite
)
1570 ;; arch-tag: 33a98396-90e9-49c8-b0e9-b606386d6e8c
1571 ;;; icalendar-testsuite.el ends here