1 ;; icalendar-testsuite.el --- Test suite for icalendar.el
3 ;; Copyright (C) 2005, 2008 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, or (at your option)
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; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 ;; Boston, MA 02110-1301, USA.
30 ;; - Add more unit tests for functions, timezone etc.
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))
53 (defun icalendar-testsuite--test-format-ical-event ()
54 "Test icalendar--format-ical-event"
55 (let ((icalendar-import-format "%s%d%l%o%t%u%c")
56 (icalendar-import-format-summary "SUM %s")
57 (icalendar-import-format-location " LOC %s")
58 (icalendar-import-format-description " DES %s")
59 (icalendar-import-format-organizer " ORG %s")
60 (icalendar-import-format-status " STA %s")
61 (icalendar-import-format-url " URL %s")
62 (icalendar-import-format-class " CLA %s")
63 (was-european-calendar european-calendar-style
)
64 (event (icalendar-testsuite--get-ical-event "BEGIN:VEVENT
65 DTSTAMP:20030509T043439Z
66 DTSTART:20030509T103000
74 (assert (string= (icalendar--format-ical-event event
)
75 "SUM sum DES des LOC loc ORG org") t
)
76 (setq icalendar-import-format
(lambda (&rest ignore
)
78 (assert (string= (icalendar--format-ical-event event
)
80 (setq icalendar-import-format
82 (format "-%s-%s-%s-%s-%s-%s-%s-"
83 (icalendar--get-event-property event
'SUMMARY
)
84 (icalendar--get-event-property event
'DESCRIPTION
)
85 (icalendar--get-event-property event
'LOCATION
)
86 (icalendar--get-event-property event
'ORGANIZER
)
87 (icalendar--get-event-property event
'STATUS
)
88 (icalendar--get-event-property event
'URL
)
89 (icalendar--get-event-property event
'CLASS
))))
90 (assert (string= (icalendar--format-ical-event event
)
91 "-sum-des-loc-org-nil-nil-nil-") t
)))
93 (defun icalendar-testsuite--test-parse-summary-and-rest ()
94 "Test icalendar--parse-summary-and-rest."
95 (let ((icalendar-import-format "%s%d%l%o%t%u%c")
96 (icalendar-import-format-summary "SUM %s")
97 (icalendar-import-format-location " LOC %s")
98 (icalendar-import-format-description " DES %s")
99 (icalendar-import-format-organizer " ORG %s")
100 (icalendar-import-format-status " STA %s")
101 (icalendar-import-format-url " URL %s")
102 (icalendar-import-format-class " CLA %s")
103 (was-european-calendar european-calendar-style
)
105 ;; FIXME: need a trailing blank char!
106 (setq result
(icalendar--parse-summary-and-rest "SUM sum ORG org "))
107 (assert (string= (cdr (assoc 'org result
)) "org"))
109 (setq result
(icalendar--parse-summary-and-rest
110 "SUM sum DES des LOC loc ORG org STA sta URL url CLA cla "))
111 (assert (string= (cdr (assoc 'des result
)) "des"))
112 (assert (string= (cdr (assoc 'loc result
)) "loc"))
113 (assert (string= (cdr (assoc 'org result
)) "org"))
114 (assert (string= (cdr (assoc 'sta result
)) "sta"))
115 (assert (string= (cdr (assoc 'cla result
)) "cla"))
117 (setq icalendar-import-format
(lambda () "Hello world"))
118 (setq result
(icalendar--parse-summary-and-rest
120 (assert (not result
))
123 (defun icalendar-testsuite--get-ical-event (ical-string)
124 "Helper function for testing `icalendar-testsuite--test-format-ical-event'."
128 (goto-char (point-min))
129 (car (icalendar--read-element nil nil
)))))
131 (defun icalendar-testsuite--test-import-format-sample ()
132 "Test method for `icalendar-import-format-sample'."
133 (assert (string= (icalendar-import-format-sample
134 (icalendar-testsuite--get-ical-event "BEGIN:VEVENT
135 DTSTAMP:20030509T043439Z
136 DTSTART:20030509T103000
140 DTEND:20030509T153000
144 (concat "SUMMARY=`a' DESCRIPTION=`b' LOCATION=`c' "
145 "ORGANIZER=`d' STATUS=`' URL=`' CLASS=`'"))))
147 (defun icalendar-testsuite--test-first-weekday-of-year ()
148 (assert (eq 1 (icalendar-first-weekday-of-year "TU" 2008)))
149 (assert (eq 3 (icalendar-first-weekday-of-year "WE" 2007)))
150 (assert (eq 5 (icalendar-first-weekday-of-year "TH" 2006)))
151 (assert (eq 7 (icalendar-first-weekday-of-year "FR" 2005)))
152 (assert (eq 3 (icalendar-first-weekday-of-year "SA" 2004)))
153 (assert (eq 5 (icalendar-first-weekday-of-year "SU" 2003)))
154 (assert (eq 7 (icalendar-first-weekday-of-year "MO" 2002)))
155 (assert (eq 3 (icalendar-first-weekday-of-year "MO" 2000)))
156 (assert (eq 1 (icalendar-first-weekday-of-year "TH" 1970))))
158 ;; ======================================================================
159 ;; Test methods for exporting from diary to icalendar
160 ;; ======================================================================
162 (defun icalendar-testsuite--test-export (input-european input-american
164 "Perform an export test.
165 Argument INPUT-EUROPEAN european style diary string.
166 Argument INPUT-AMERICAN american style diary string.
167 Argument EXPECTED-OUTPUT expected icalendar result string."
168 (message "--- icalendar-testsuite--test-export ---")
169 (let ((was-european-calendar european-calendar-style
)
170 (icalendar-recurring-start-year 2000))
171 (set-time-zone-rule "CET") ;;FIXME: reset timezone!
173 (let ((calendar-month-name-array
174 ["Januar" "Februar" "März" "April" "Mai" "Juni" "Juli" "August"
175 "September" "Oktober" "November" "Dezember"])
176 (calendar-day-name-array
177 ["Sonntag" "Montag" "Dienstag" "Mittwoch" "Donnerstag" "Freitag"
180 (icalendar-testsuite--do-test-export input-european expected-output
)))
182 (let ((calendar-month-name-array
183 ["January" "February" "March" "April" "May" "June" "July" "August"
184 "September" "October" "November" "December"])
185 (calendar-day-name-array
186 ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday"
189 (icalendar-testsuite--do-test-export input-american expected-output
)))
190 (if was-european-calendar
192 (american-calendar))))
194 (defun icalendar-testsuite--do-test-export (input expected-output
)
195 "Actually perform export test.
196 Argument INPUT input diary string.
197 Argument EXPECTED-OUTPUT expected icalendar result string."
198 (let ((temp-file (make-temp-file "icalendar-testsuite-ics")))
201 (icalendar-export-region (point-min) (point-max) temp-file
))
203 (find-file temp-file
)
204 (goto-char (point-min))
206 (cond (expected-output
207 (and (re-search-forward "^\\s-*BEGIN:VCALENDAR
208 PRODID:-//Emacs//NONSGML icalendar.el//EN
219 (regexp-quote (buffer-substring-no-properties
220 (match-beginning 1) (match-end 1)))
224 (re-search-forward "^\\s-*BEGIN:VCALENDAR
225 PRODID:-//Emacs//NONSGML icalendar.el//EN
231 "Export test failed! Input: `%s'\nFound:\n\n%s\n\nbut expected\n\n%s"
233 (or (and (match-beginning 1)
234 (buffer-substring-no-properties (match-beginning 1) (match-end 1)))
236 (or expected-output
"<nil>"))))
237 (kill-buffer (find-buffer-visiting temp-file
))
238 (delete-file temp-file
)))
240 ;; ======================================================================
241 ;; Test methods for importing from icalendar to diary
242 ;; ======================================================================
244 (defun icalendar-testsuite--test-import (input expected-european
246 "Perform import test.
247 Argument INPUT icalendar event string.
248 Argument EXPECTED-EUROPEAN expected european style diary string.
249 Argument EXPECTED-AMERICAN expected american style diary string."
250 (message "--- icalendar-testsuite--test-import ---")
251 (let ((timezone (cadr (current-time-zone))))
252 (set-time-zone-rule "CET")
254 (if (string-match "^BEGIN:VCALENDAR" input
)
256 (insert "BEGIN:VCALENDAR\nPRODID:-//Emacs//NONSGML icalendar.el//EN\n")
257 (insert "VERSION:2.0\nBEGIN:VEVENT\n")
259 (unless (eq (char-before) ?
\n)
261 (insert "END:VEVENT\nEND:VCALENDAR\n"))
262 (let ((icalendar-import-format "%s%d%l%o%t%u%c")
263 (icalendar-import-format-summary "%s")
264 (icalendar-import-format-location "\n Location: %s")
265 (icalendar-import-format-description "\n Desc: %s")
266 (icalendar-import-format-organizer "\n Organizer: %s")
267 (icalendar-import-format-status "\n Status: %s")
268 (icalendar-import-format-url "\n URL: %s")
269 (icalendar-import-format-class "\n Class: %s")
270 (was-european-calendar european-calendar-style
))
271 (when expected-european
273 (icalendar-testsuite--do-test-import input expected-european
))
274 (when expected-american
276 (icalendar-testsuite--do-test-import input expected-american
))
277 (if was-european-calendar
279 (american-calendar))))
280 (set-time-zone-rule timezone
)))
282 (defun icalendar-testsuite--do-test-import (input expected-output
)
283 "Actually perform import test.
284 Argument INPUT input icalendar string.
285 Argument EXPECTED-OUTPUT expected diary string."
286 (let ((temp-file (make-temp-file "icalendar-test-diary")))
287 (icalendar-import-buffer temp-file t t
)
289 (find-file temp-file
)
290 (let ((result (buffer-substring-no-properties (point-min) (point-max))))
291 (unless (string-match (concat "^\\s-*" expected-output
"\\s-*$")
293 (error "Import test failed! Found `%s'\nbut expected `%s'" result
295 (kill-buffer (find-buffer-visiting temp-file
))
296 (delete-file temp-file
))))
298 ;; ======================================================================
299 ;; Test methods for cycle...
300 ;; ======================================================================
301 (defun icalendar-testsuite--test-cycle (input)
303 Argument INPUT icalendar event string."
305 (if (string-match "^BEGIN:VCALENDAR" input
)
307 (insert "BEGIN:VCALENDAR\nPRODID:-//Emacs//NONSGML icalendar.el//EN\n")
308 (insert "VERSION:2.0\nBEGIN:VEVENT\n")
310 (unless (eq (char-before) ?
\n)
312 (insert "END:VEVENT\nEND:VCALENDAR\n"))
313 (let ((icalendar-import-format "%s%d%l%o%t%u%c")
314 (icalendar-import-format-summary "%s")
315 (icalendar-import-format-location "\n Location: %s")
316 (icalendar-import-format-description "\n Desc: %s")
317 (icalendar-import-format-organizer "\n Organizer: %s")
318 (icalendar-import-format-status "\n Status: %s")
319 (icalendar-import-format-url "\n URL: %s")
320 (icalendar-import-format-class "\n Class: %s")
321 (was-european-calendar european-calendar-style
))
323 (icalendar-testsuite--do-test-cycle)
325 (icalendar-testsuite--do-test-cycle)
326 (if was-european-calendar
328 (american-calendar)))))
330 (defun icalendar-testsuite--do-test-cycle ()
331 "Actually perform import/export cycle test."
332 (let ((temp-diary (make-temp-file "icalendar-test-diary"))
333 (temp-ics (make-temp-file "icalendar-test-ics"))
334 (org-input (buffer-substring-no-properties (point-min) (point-max))))
335 (icalendar-import-buffer temp-diary t t
)
337 (find-file temp-diary
)
338 (icalendar-export-region (point-min) (point-max) temp-ics
))
341 (goto-char (point-min))
342 (when (re-search-forward "\nUID:.*\n" nil t
)
343 (replace-match "\n"))
344 (let ((cycled (buffer-substring-no-properties (point-min) (point-max))))
345 (unless (string-equal org-input cycled
)
346 (error "Import test failed! Found `%s'\nbut expected `%s'" cycled
348 (kill-buffer (find-buffer-visiting temp-diary
))
350 (set-buffer (find-buffer-visiting temp-ics
))
351 (set-buffer-modified-p nil
)
352 (kill-buffer (current-buffer)))
353 (delete-file temp-diary
)
354 (delete-file temp-ics
)))
356 ;; ======================================================================
358 ;; ======================================================================
359 (defun icalendar-testsuite--run-import-tests ()
360 "Perform standard import tests."
361 (icalendar-testsuite--test-import
362 "SUMMARY:non-recurring
363 DTSTART;VALUE=DATE-TIME:20030919T090000
364 DTEND;VALUE=DATE-TIME:20030919T113000"
365 "&19/9/2003 09:00-11:30 non-recurring"
366 "&9/19/2003 09:00-11:30 non-recurring")
368 (icalendar-testsuite--test-import
369 "SUMMARY:non-recurring allday
370 DTSTART;VALUE=DATE-TIME:20030919"
371 "&19/9/2003 non-recurring allday"
372 "&9/19/2003 non-recurring allday")
374 (icalendar-testsuite--test-import
377 DTSTART;VALUE=DATE:20030919"
378 "&19/9/2003 long summary"
379 "&9/19/2003 long summary")
381 (icalendar-testsuite--test-import
382 "UID:748f2da0-0d9b-11d8-97af-b4ec8686ea61
386 X-MOZILLA-ALARM-DEFAULT-UNITS:Minuten
387 X-MOZILLA-RECUR-DEFAULT-INTERVAL:0
388 DTSTART;VALUE=DATE:20040719
389 DTEND;VALUE=DATE:20040828
390 DTSTAMP:20031103T011641Z
392 "&%%(and (diary-block 19 7 2004 27 8 2004)) Sommerferien"
393 "&%%(and (diary-block 7 19 2004 8 27 2004)) Sommerferien")
394 (icalendar-testsuite--test-import
396 :04979712-3902-11d9-93dd-8f9f4afe08da
403 X-MOZILLA-ALARM-DEFAULT-LENGTH
414 "&23/11/2004 14:00-14:30 folded summary"
415 "&11/23/2004 14:00-14:30 folded summary")
416 (icalendar-testsuite--test-import
418 :6161a312-3902-11d9-b512-f764153bb28b
425 X-MOZILLA-ALARM-DEFAULT-LENGTH
434 "&23/11/2004 14:45-15:45 another example"
435 "&11/23/2004 14:45-15:45 another example")
436 (icalendar-testsuite--test-import
438 DTSTART;VALUE=DATE-TIME:20030919T090000
439 DTEND;VALUE=DATE-TIME:20030919T113000
442 "&%%(and (diary-cyclic 1 19 9 2003)) 09:00-11:30 rrule daily"
443 "&%%(and (diary-cyclic 1 9 19 2003)) 09:00-11:30 rrule daily")
446 (icalendar-testsuite--test-import
448 DTSTART;VALUE=DATE-TIME:20030919T090000
449 DTEND;VALUE=DATE-TIME:20030919T113000
450 RRULE:FREQ=DAILY;INTERVAL=2
452 "&%%(and (diary-cyclic 2 19 9 2003)) 09:00-11:30 rrule daily"
453 "&%%(and (diary-cyclic 2 9 19 2003)) 09:00-11:30 rrule daily")
454 (icalendar-testsuite--test-import
455 "SUMMARY:rrule daily with exceptions
456 DTSTART;VALUE=DATE-TIME:20030919T090000
457 DTEND;VALUE=DATE-TIME:20030919T113000
458 RRULE:FREQ=DAILY;INTERVAL=2
459 EXDATE:20030921,20030925
461 "&%%(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"
462 "&%%(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")
463 (icalendar-testsuite--test-import
464 "SUMMARY:rrule weekly
465 DTSTART;VALUE=DATE-TIME:20030919T090000
466 DTEND;VALUE=DATE-TIME:20030919T113000
469 "&%%(and (diary-cyclic 7 19 9 2003)) 09:00-11:30 rrule weekly"
470 "&%%(and (diary-cyclic 7 9 19 2003)) 09:00-11:30 rrule weekly")
471 (icalendar-testsuite--test-import
472 "SUMMARY:rrule monthly no end
473 DTSTART;VALUE=DATE-TIME:20030919T090000
474 DTEND;VALUE=DATE-TIME:20030919T113000
477 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 1 1 9999)) 09:00-11:30 rrule monthly no end"
478 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 1 1 9999)) 09:00-11:30 rrule monthly no end")
479 (icalendar-testsuite--test-import
480 "SUMMARY:rrule monthly with end
481 DTSTART;VALUE=DATE-TIME:20030919T090000
482 DTEND;VALUE=DATE-TIME:20030919T113000
483 RRULE:FREQ=MONTHLY;UNTIL=20050819;
485 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 8 2005)) 09:00-11:30 rrule monthly with end"
486 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 8 19 2005)) 09:00-11:30 rrule monthly with end")
487 (icalendar-testsuite--test-import
488 "DTSTART;VALUE=DATE:20040815
489 DTEND;VALUE=DATE:20040816
490 SUMMARY:Maria Himmelfahrt
491 UID:CC56BEA6-49D2-11D8-8833-00039386D1C2-RID
492 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=8
494 "&%%(and (diary-anniversary 15 8 2004)) Maria Himmelfahrt"
495 "&%%(and (diary-anniversary 8 15 2004)) Maria Himmelfahrt")
496 (icalendar-testsuite--test-import
497 "SUMMARY:rrule yearly
498 DTSTART;VALUE=DATE-TIME:20030919T090000
499 DTEND;VALUE=DATE-TIME:20030919T113000
500 RRULE:FREQ=YEARLY;INTERVAL=2
502 "&%%(and (diary-anniversary 19 9 2003)) 09:00-11:30 rrule yearly" ;FIXME
503 "&%%(and (diary-anniversary 9 19 2003)) 09:00-11:30 rrule yearly") ;FIXME
504 (icalendar-testsuite--test-import
505 "SUMMARY:rrule count daily short
506 DTSTART;VALUE=DATE-TIME:20030919T090000
507 DTEND;VALUE=DATE-TIME:20030919T113000
508 RRULE:FREQ=DAILY;COUNT=1;INTERVAL=1
510 "&%%(and (diary-cyclic 1 19 9 2003) (diary-block 19 9 2003 19 9 2003)) 09:00-11:30 rrule count daily short"
511 "&%%(and (diary-cyclic 1 9 19 2003) (diary-block 9 19 2003 9 19 2003)) 09:00-11:30 rrule count daily short")
512 (icalendar-testsuite--test-import
513 "SUMMARY:rrule count daily long
514 DTSTART;VALUE=DATE-TIME:20030919T090000
515 DTEND;VALUE=DATE-TIME:20030919T113000
516 RRULE:FREQ=DAILY;COUNT=14;INTERVAL=1
518 "&%%(and (diary-cyclic 1 19 9 2003) (diary-block 19 9 2003 2 10 2003)) 09:00-11:30 rrule count daily long"
519 "&%%(and (diary-cyclic 1 9 19 2003) (diary-block 9 19 2003 10 2 2003)) 09:00-11:30 rrule count daily long")
520 (icalendar-testsuite--test-import
521 "SUMMARY:rrule count bi-weekly 3 times
522 DTSTART;VALUE=DATE-TIME:20030919T090000
523 DTEND;VALUE=DATE-TIME:20030919T113000
524 RRULE:FREQ=WEEKLY;COUNT=3;INTERVAL=2
526 "&%%(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"
527 "&%%(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")
528 (icalendar-testsuite--test-import
529 "SUMMARY:rrule count monthly
530 DTSTART;VALUE=DATE-TIME:20030919T090000
531 DTEND;VALUE=DATE-TIME:20030919T113000
532 RRULE:FREQ=MONTHLY;INTERVAL=1;COUNT=5
534 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 1 2004)) 09:00-11:30 rrule count monthly"
535 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 1 19 2004)) 09:00-11:30 rrule count monthly")
536 (icalendar-testsuite--test-import
537 "SUMMARY:rrule count every second month
538 DTSTART;VALUE=DATE-TIME:20030919T090000
539 DTEND;VALUE=DATE-TIME:20030919T113000
540 RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=5
542 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 5 2004)) 09:00-11:30 rrule count every second month" ;FIXME
543 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 5 19 2004)) 09:00-11:30 rrule count every second month") ;FIXME
544 (icalendar-testsuite--test-import
545 "SUMMARY:rrule count yearly
546 DTSTART;VALUE=DATE-TIME:20030919T090000
547 DTEND;VALUE=DATE-TIME:20030919T113000
548 RRULE:FREQ=YEARLY;INTERVAL=1;COUNT=5
550 "&%%(and (diary-date 19 9 t) (diary-block 19 9 2003 19 9 2007)) 09:00-11:30 rrule count yearly"
551 "&%%(and (diary-date 9 19 t) (diary-block 9 19 2003 9 19 2007)) 09:00-11:30 rrule count yearly")
552 (icalendar-testsuite--test-import
553 "SUMMARY:rrule count every second year
554 DTSTART;VALUE=DATE-TIME:20030919T090000
555 DTEND;VALUE=DATE-TIME:20030919T113000
556 RRULE:FREQ=YEARLY;INTERVAL=2;COUNT=5
558 "&%%(and (diary-date 19 9 t) (diary-block 19 9 2003 19 9 2011)) 09:00-11:30 rrule count every second year" ;FIXME!!!
559 "&%%(and (diary-date 9 19 t) (diary-block 9 19 2003 9 19 2011)) 09:00-11:30 rrule count every second year") ;FIXME!!!
562 (icalendar-testsuite--test-import
563 "DTSTART;VALUE=DATE:20050217
567 "&%%(and (diary-block 17 2 2005 23 2 2005)) duration"
568 "&%%(and (diary-block 2 17 2005 2 23 2005)) duration")
570 (icalendar-testsuite--test-import
571 "UID:20041127T183329Z-18215-1001-4536-49109@andromeda
572 DTSTAMP:20041127T183315Z
573 LAST-MODIFIED:20041127T183329
575 DTSTART;VALUE=DATE:20011221
576 DTEND;VALUE=DATE:20011221
577 RRULE:FREQ=DAILY;UNTIL=20011229;INTERVAL=1;WKST=SU
580 CREATED:20041127T183329
582 "&%%(and (diary-cyclic 1 21 12 2001) (diary-block 21 12 2001 29 12 2001)) Urlaub"
583 "&%%(and (diary-cyclic 1 12 21 2001) (diary-block 12 21 2001 12 29 2001)) Urlaub")
586 ;; ======================================================================
588 ;; ======================================================================
589 (defun icalendar-testsuite--run-export-tests ()
590 "Perform standard export tests."
592 (let ((icalendar-export-hidden-diary-entries nil
))
593 (icalendar-testsuite--test-export
594 "&3 Okt 2000 ordinary no time "
595 "&Oct 3 2000 ordinary no time "
599 (icalendar-testsuite--test-export
600 "3 Okt 2000 ordinary no time "
601 "Oct 3 2000 ordinary no time "
602 "DTSTART;VALUE=DATE:20001003
603 DTEND;VALUE=DATE:20001004
604 SUMMARY:ordinary no time
606 (icalendar-testsuite--test-export
607 "3 Okt 2000 16:30 ordinary with time"
608 "Oct 3 2000 16:30 ordinary with time"
609 "DTSTART;VALUE=DATE-TIME:20001003T163000
610 DTEND;VALUE=DATE-TIME:20001003T173000
611 SUMMARY:ordinary with time
613 (icalendar-testsuite--test-export
614 "3 10 2000 16:30 ordinary with time 2"
615 "10 3 2000 16:30 ordinary with time 2"
616 "DTSTART;VALUE=DATE-TIME:20001003T163000
617 DTEND;VALUE=DATE-TIME:20001003T173000
618 SUMMARY:ordinary with time 2
621 (icalendar-testsuite--test-export
622 "3/10/2000 16:30 ordinary with time 3"
623 "10/3/2000 16:30 ordinary with time 3"
624 "DTSTART;VALUE=DATE-TIME:20001003T163000
625 DTEND;VALUE=DATE-TIME:20001003T173000
626 SUMMARY:ordinary with time 3
629 ;; multiline -- FIXME!!!
630 (icalendar-testsuite--test-export
631 "3 Oktober 2000 16:30 multiline
632 17:30 multiline continued FIXME"
633 "October 3 2000 16:30 multiline
634 17:30 multiline continued FIXME"
635 "DTSTART;VALUE=DATE-TIME:20001003T163000
636 DTEND;VALUE=DATE-TIME:20001003T173000
639 17:30 multiline continued FIXME
643 (icalendar-testsuite--test-export
644 "Montag 13:30 weekly by day with start time"
645 "Monday 1:30pm weekly by day with start time"
646 "DTSTART;VALUE=DATE-TIME:20000103T133000
647 DTEND;VALUE=DATE-TIME:20000103T143000
648 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO
649 SUMMARY:weekly by day with start time
652 (icalendar-testsuite--test-export
653 "Montag 13:30-15:00 weekly by day with start and end time"
654 "Monday 01:30pm-03:00pm weekly by day with start and end time"
655 "DTSTART;VALUE=DATE-TIME:20000103T133000
656 DTEND;VALUE=DATE-TIME:20000103T150000
657 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO
658 SUMMARY:weekly by day with start and end time
662 (icalendar-testsuite--test-export
663 "1 Mai yearly no time"
664 "may 1 yearly no time"
665 "DTSTART;VALUE=DATE:19000501
666 DTEND;VALUE=DATE:19000502
667 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=5;BYMONTHDAY=1
668 SUMMARY:yearly no time
672 (icalendar-testsuite--test-export
673 "%%(diary-anniversary 3 10 1989) anniversary no time"
674 "%%(diary-anniversary 10 3 1989) anniversary no time"
675 "DTSTART;VALUE=DATE:19891003
676 DTEND;VALUE=DATE:19891004
677 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=10;BYMONTHDAY=03
678 SUMMARY:anniversary no time
680 (icalendar-testsuite--test-export
681 "%%(diary-anniversary 3 10 1989) 19:00-20:00 anniversary with time"
682 "%%(diary-anniversary 10 3 1989) 19:00-20:00 anniversary with time"
683 "DTSTART;VALUE=DATE-TIME:19891003T190000
684 DTEND;VALUE=DATE-TIME:19891004T200000
685 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=10;BYMONTHDAY=03
686 SUMMARY:anniversary with time
690 (icalendar-testsuite--test-export
691 "%%(diary-block 18 6 2001 6 7 2001) block no time"
692 "%%(diary-block 6 18 2001 7 6 2001) block no time"
693 "DTSTART;VALUE=DATE:20010618
694 DTEND;VALUE=DATE:20010707
695 SUMMARY:block no time
697 (icalendar-testsuite--test-export
698 "%%(diary-block 18 6 2001 6 7 2001) 13:00-17:00 block with time"
699 "%%(diary-block 6 18 2001 7 6 2001) 13:00-17:00 block with time"
700 "DTSTART;VALUE=DATE-TIME:20010618T130000
701 DTEND;VALUE=DATE-TIME:20010618T170000
702 RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20010706
703 SUMMARY:block with time
705 (icalendar-testsuite--test-export
706 "%%(diary-block 18 6 2001 6 7 2001) 13:00 block no end time"
707 "%%(diary-block 6 18 2001 7 6 2001) 13:00 block no end time"
708 "DTSTART;VALUE=DATE-TIME:20010618T130000
709 DTEND;VALUE=DATE-TIME:20010618T140000
710 RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20010706
711 SUMMARY:block no end time
715 ;; ======================================================================
717 ;; ======================================================================
718 (defun icalendar-testsuite--run-real-world-tests ()
719 "Perform real-world tests, as gathered from problem reports."
721 (icalendar-testsuite--test-import
724 PRODID:Microsoft CDO for Microsoft Exchange
727 TZID:Kolkata\, Chennai\, Mumbai\, New Delhi
728 X-MICROSOFT-CDO-TZID:23
730 DTSTART:16010101T000000
735 DTSTART:16010101T000000
741 DTSTAMP:20030509T043439Z
742 DTSTART;TZID=\"Kolkata, Chennai, Mumbai, New Delhi\":20030509T103000
743 SUMMARY:On-Site Interview
744 UID:040000008200E00074C5B7101A82E0080000000080B6DE661216C301000000000000000
745 010000000DB823520692542408ED02D7023F9DFF9
746 ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=\"Xxxxx
747 xxx Xxxxxxxxxxxx\":MAILTO:xxxxxxxx@xxxxxxx.com
748 ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=\"Yyyyyyy Y
749 yyyy\":MAILTO:yyyyyyy@yyyyyyy.com
750 ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=\"Zzzz Zzzz
751 zz\":MAILTO:zzzzzz@zzzzzzz.com
752 ORGANIZER;CN=\"Aaaaaa Aaaaa\":MAILTO:aaaaaaa@aaaaaaa.com
754 DTEND;TZID=\"Kolkata, Chennai, Mumbai, New Delhi\":20030509T153000
755 DESCRIPTION:10:30am - Blah
759 CREATED:20030509T043439Z
760 LAST-MODIFIED:20030509T043459Z
763 X-MICROSOFT-CDO-BUSYSTATUS:BUSY
764 X-MICROSOFT-CDO-INSTTYPE:0
765 X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
766 X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
767 X-MICROSOFT-CDO-IMPORTANCE:1
768 X-MICROSOFT-CDO-OWNERAPPTID:126441427
772 TRIGGER;RELATED=START:-PT00H15M00S
776 "&9/5/2003 10:30-15:30 On-Site Interview
779 Organizer: MAILTO:aaaaaaa@aaaaaaa.com"
780 "&5/9/2003 10:30-15:30 On-Site Interview
783 Organizer: MAILTO:aaaaaaa@aaaaaaa.com")
786 (icalendar-testsuite--test-import
787 "DTSTAMP:20030618T195512Z
788 DTSTART;TZID=\"Mountain Time (US & Canada)\":20030623T110000
789 SUMMARY:Dress Rehearsal for XXXX-XXXX
790 UID:040000008200E00074C5B7101A82E00800000000608AA7DA9835C301000000000000000
791 0100000007C3A6D65EE726E40B7F3D69A23BD567E
792 ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=\"AAAAA,AAA
793 AA (A-AAAAAAA,ex1)\":MAILTO:aaaaa_aaaaa@aaaaa.com
794 ORGANIZER;CN=\"ABCD,TECHTRAINING
795 (A-Americas,exgen1)\":MAILTO:xxx@xxxxx.com
796 LOCATION:555 or TN 555-5555 ID 5555 & NochWas (see below)
797 DTEND;TZID=\"Mountain Time (US & Canada)\":20030623T120000
798 DESCRIPTION:753 Zeichen hier radiert
802 CREATED:20030618T195518Z
803 LAST-MODIFIED:20030618T195527Z
806 X-MICROSOFT-CDO-BUSYSTATUS:BUSY
807 X-MICROSOFT-CDO-INSTTYPE:0
808 X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
809 X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
810 X-MICROSOFT-CDO-IMPORTANCE:1
811 X-MICROSOFT-CDO-OWNERAPPTID:1022519251
815 TRIGGER;RELATED=START:-PT00H15M00S
817 "&23/6/2003 11:00-12:00 Dress Rehearsal for XXXX-XXXX
818 Desc: 753 Zeichen hier radiert
819 Location: 555 or TN 555-5555 ID 5555 & NochWas (see below)
820 Organizer: MAILTO:xxx@xxxxx.com"
821 "&6/23/2003 11:00-12:00 Dress Rehearsal for XXXX-XXXX
822 Desc: 753 Zeichen hier radiert
823 Location: 555 or TN 555-5555 ID 5555 & NochWas (see below)
824 Organizer: MAILTO:xxx@xxxxx.com")
826 ;; 2003-06-18 b -- uses timezone
827 (icalendar-testsuite--test-import
830 PRODID:Microsoft CDO for Microsoft Exchange
833 TZID:Mountain Time (US & Canada)
834 X-MICROSOFT-CDO-TZID:12
836 DTSTART:16010101T020000
839 RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
842 DTSTART:16010101T020000
845 RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=4;BYDAY=1SU
849 DTSTAMP:20030618T230323Z
850 DTSTART;TZID=\"Mountain Time (US & Canada)\":20030623T090000
851 SUMMARY:Updated: Dress Rehearsal for ABC01-15
852 UID:040000008200E00074C5B7101A82E00800000000608AA7DA9835C301000000000000000
853 0100000007C3A6D65EE726E40B7F3D69A23BD567E
854 ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;X-REPLYTIME=20030618T20
855 0700Z;RSVP=TRUE;CN=\"AAAAA,AAAAAA
856 \(A-AAAAAAA,ex1)\":MAILTO:aaaaaa_aaaaa@aaaaa
858 ORGANIZER;CN=\"ABCD,TECHTRAINING
859 \(A-Americas,exgen1)\":MAILTO:bbb@bbbbb.com
860 LOCATION:123 or TN 123-1234 ID abcd & SonstWo (see below)
861 DTEND;TZID=\"Mountain Time (US & Canada)\":20030623T100000
862 DESCRIPTION:Viele Zeichen standen hier früher
866 CREATED:20030618T230326Z
867 LAST-MODIFIED:20030618T230335Z
870 X-MICROSOFT-CDO-BUSYSTATUS:BUSY
871 X-MICROSOFT-CDO-INSTTYPE:0
872 X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
873 X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
874 X-MICROSOFT-CDO-IMPORTANCE:1
875 X-MICROSOFT-CDO-OWNERAPPTID:1022519251
879 TRIGGER;RELATED=START:-PT00H15M00S
883 "&23/6/2003 17:00-18:00 Updated: Dress Rehearsal for ABC01-15
884 Desc: Viele Zeichen standen hier früher
885 Location: 123 or TN 123-1234 ID abcd & SonstWo (see below)
886 Organizer: MAILTO:bbb@bbbbb.com
888 "&6/23/2003 17:00-18:00 Updated: Dress Rehearsal for ABC01-15
889 Desc: Viele Zeichen standen hier früher
890 Location: 123 or TN 123-1234 ID abcd & SonstWo (see below)
891 Organizer: MAILTO:bbb@bbbbb.com
894 ;; export 2004-10-28 block entries
895 (icalendar-testsuite--test-export
897 "-*- mode: text; fill-column: 256;-*-
901 %%(diary-block 11 8 2004 11 10 2004) Nov 8-10 aa
903 "DTSTART;VALUE=DATE:20041108
904 DTEND;VALUE=DATE:20041111
905 SUMMARY:Nov 8-10 aa")
907 (icalendar-testsuite--test-export
909 "%%(diary-block 12 13 2004 12 17 2004) Dec 13-17 bb"
910 "DTSTART;VALUE=DATE:20041213
911 DTEND;VALUE=DATE:20041218
912 SUMMARY:Dec 13-17 bb")
914 (icalendar-testsuite--test-export
916 "%%(diary-block 2 3 2005 2 4 2005) Feb 3-4 cc"
917 "DTSTART;VALUE=DATE:20050203
918 DTEND;VALUE=DATE:20050205
921 (icalendar-testsuite--test-export
923 "%%(diary-block 4 24 2005 4 29 2005) April 24-29 dd"
924 "DTSTART;VALUE=DATE:20050424
925 DTEND;VALUE=DATE:20050430
926 SUMMARY:April 24-29 dd
928 (icalendar-testsuite--test-export
930 "%%(diary-block 5 30 2005 6 1 2005) may 30 - June 1: ee"
931 "DTSTART;VALUE=DATE:20050530
932 DTEND;VALUE=DATE:20050602
933 SUMMARY:may 30 - June 1: ee")
935 (icalendar-testsuite--test-export
937 "%%(diary-block 6 6 2005 6 8 2005) ff"
938 "DTSTART;VALUE=DATE:20050606
939 DTEND;VALUE=DATE:20050609
942 ;; export 2004-10-28 anniversary entries
943 (icalendar-testsuite--test-export
948 %%(diary-anniversary 3 28 1991) aa birthday (%d years old)"
949 "DTSTART;VALUE=DATE:19910328
950 DTEND;VALUE=DATE:19910329
951 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=03;BYMONTHDAY=28
952 SUMMARY:aa birthday (%d years old)
955 (icalendar-testsuite--test-export
957 "%%(diary-anniversary 5 17 1957) bb birthday (%d years old)"
958 "DTSTART;VALUE=DATE:19570517
959 DTEND;VALUE=DATE:19570518
960 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=05;BYMONTHDAY=17
961 SUMMARY:bb birthday (%d years old)")
963 (icalendar-testsuite--test-export
965 "%%(diary-anniversary 6 8 1997) cc birthday (%d years old)"
966 "DTSTART;VALUE=DATE:19970608
967 DTEND;VALUE=DATE:19970609
968 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=06;BYMONTHDAY=08
969 SUMMARY:cc birthday (%d years old)")
971 (icalendar-testsuite--test-export
973 "%%(diary-anniversary 7 22 1983) dd (%d years ago...!)"
974 "DTSTART;VALUE=DATE:19830722
975 DTEND;VALUE=DATE:19830723
976 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=07;BYMONTHDAY=22
977 SUMMARY:dd (%d years ago...!)")
979 (icalendar-testsuite--test-export
981 "%%(diary-anniversary 8 1 1988) ee birthday (%d years old)"
982 "DTSTART;VALUE=DATE:19880801
983 DTEND;VALUE=DATE:19880802
984 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=08;BYMONTHDAY=01
985 SUMMARY:ee birthday (%d years old)")
987 (icalendar-testsuite--test-export
989 "%%(diary-anniversary 9 21 1957) ff birthday (%d years old)"
990 "DTSTART;VALUE=DATE:19570921
991 DTEND;VALUE=DATE:19570922
992 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=09;BYMONTHDAY=21
993 SUMMARY:ff birthday (%d years old)")
998 ;; export 2004-10-28 monthly, weekly entries
1000 ;; (icalendar-testsuite--test-export
1003 ;; >>> ------------ monthly:
1005 ;; */27/* 10:00 blah blah"
1008 (icalendar-testsuite--test-export
1010 ">>> ------------ my week:
1013 "DTSTART;VALUE=DATE-TIME:20000103T130000
1014 DTEND;VALUE=DATE-TIME:20000103T140000
1015 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO
1018 (icalendar-testsuite--test-export
1021 "DTSTART;VALUE=DATE-TIME:20000103T150000
1022 DTEND;VALUE=DATE-TIME:20000103T160000
1023 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO
1027 (icalendar-testsuite--test-export
1029 "Monday 16:00-17:00 a2"
1030 "DTSTART;VALUE=DATE-TIME:20000103T160000
1031 DTEND;VALUE=DATE-TIME:20000103T170000
1032 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO
1035 (icalendar-testsuite--test-export
1037 "Tuesday 11:30-13:00 a3"
1038 "DTSTART;VALUE=DATE-TIME:20000104T113000
1039 DTEND;VALUE=DATE-TIME:20000104T130000
1040 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=TU
1043 (icalendar-testsuite--test-export
1046 "DTSTART;VALUE=DATE-TIME:20000104T150000
1047 DTEND;VALUE=DATE-TIME:20000104T160000
1048 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=TU
1051 (icalendar-testsuite--test-export
1053 "Wednesday 13:00 a5"
1054 "DTSTART;VALUE=DATE-TIME:20000105T130000
1055 DTEND;VALUE=DATE-TIME:20000105T140000
1056 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=WE
1059 (icalendar-testsuite--test-export
1061 "Wednesday 11:30-13:30 a6"
1062 "DTSTART;VALUE=DATE-TIME:20000105T113000
1063 DTEND;VALUE=DATE-TIME:20000105T133000
1064 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=WE
1067 (icalendar-testsuite--test-export
1069 "Wednesday 15:00 s1"
1070 "DTSTART;VALUE=DATE-TIME:20000105T150000
1071 DTEND;VALUE=DATE-TIME:20000105T160000
1072 RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=WE
1076 ;; export 2004-10-28 regular entries
1077 (icalendar-testsuite--test-export
1080 >>> regular diary entries:
1082 Oct 12 2004, 14:00 Tue: [2004-10-12] q1"
1083 "DTSTART;VALUE=DATE-TIME:20041012T140000
1084 DTEND;VALUE=DATE-TIME:20041012T150000
1085 SUMMARY:Tue: [2004-10-12] q1")
1088 (icalendar-testsuite--test-import
1093 :-//Mozilla.org/NONSGML Mozilla Calendar V1.0//EN
1096 :04979712-3902-11d9-93dd-8f9f4afe08da
1103 X-MOZILLA-ALARM-DEFAULT-LENGTH
1116 :6161a312-3902-11d9-b512-f764153bb28b
1123 X-MOZILLA-ALARM-DEFAULT-LENGTH
1134 :943a4d7e-3902-11d9-9ce7-c9addeadf928
1141 X-MOZILLA-ALARM-DEFAULT-LENGTH
1152 :fe53615e-3902-11d9-9dd8-9d38a155bf41
1159 X-MOZILLA-ALARM-DEFAULT-LENGTH
1161 X-MOZILLA-RECUR-DEFAULT-INTERVAL
1164 :FREQ=WEEKLY;INTERVAL=2;BYDAY=FR
1174 :87c928ee-3901-11d9-b21f-b45042155024
1176 :Rrrr/Cccccc ii Aaaaaaaa
1178 :Vvvvv Rrrr aaa Cccccc
1183 X-MOZILLA-ALARM-DEFAULT-LENGTH
1198 :e8f331ae-3902-11d9-9948-dfdcb66a2872
1205 X-MOZILLA-ALARM-DEFAULT-LENGTH
1208 :FREQ=WEEKLY;INTERVAL=1;BYDAY=MO
1222 "&23/11/2004 14:00-14:30 Jjjjj & Wwwww
1225 &23/11/2004 14:45-15:45 BB Aaaaaaaa Bbbbb
1228 &23/11/2004 11:00-12:00 Hhhhhhhh
1231 &%%(and (diary-cyclic 14 12 11 2004)) 14:00-18:30 MMM Aaaaaaaaa
1234 &%%(and (diary-block 19 11 2004 19 11 2004)) Rrrr/Cccccc ii Aaaaaaaa
1235 Desc: Vvvvv Rrrr aaa Cccccc
1238 &%%(and (diary-cyclic 7 1 11 2004)) Wwww aa hhhh
1241 "&11/23/2004 14:00-14:30 Jjjjj & Wwwww
1244 &11/23/2004 14:45-15:45 BB Aaaaaaaa Bbbbb
1247 &11/23/2004 11:00-12:00 Hhhhhhhh
1250 &%%(and (diary-cyclic 14 11 12 2004)) 14:00-18:30 MMM Aaaaaaaaa
1253 &%%(and (diary-block 11 19 2004 11 19 2004)) Rrrr/Cccccc ii Aaaaaaaa
1254 Desc: Vvvvv Rrrr aaa Cccccc
1257 &%%(and (diary-cyclic 7 11 1 2004)) Wwww aa hhhh
1262 (icalendar-testsuite--test-export
1263 "%%(diary-block 1 1 2004 4 1 2004) Urlaub"
1265 "DTSTART;VALUE=DATE:20040101
1266 DTEND;VALUE=DATE:20040105
1270 (icalendar-testsuite--test-export
1271 "5 11 2004 Bla Fasel"
1273 "DTSTART;VALUE=DATE:20041105
1274 DTEND;VALUE=DATE:20041106
1278 (icalendar-testsuite--test-export
1279 "2 Nov 2004 15:00-16:30 Zahnarzt"
1281 "DTSTART;VALUE=DATE-TIME:20041102T150000
1282 DTEND;VALUE=DATE-TIME:20041102T163000
1286 (icalendar-testsuite--test-import
1288 :b60d398e-1dd1-11b2-a159-cf8cb05139f4
1307 "&%%(and (diary-block 6 2 2005 6 2 2005)) Waitangi Day
1309 "&%%(and (diary-block 2 6 2005 2 6 2005)) Waitangi Day
1313 (icalendar-testsuite--test-import
1314 "DTSTART;VALUE=DATE:20050217
1315 SUMMARY:Hhhhhh Aaaaa ii Aaaaaaaa
1316 UID:6AFA7558-6994-11D9-8A3A-000A95A0E830-RID
1317 DTSTAMP:20050118T210335Z
1319 "&%%(and (diary-block 17 2 2005 23 2 2005)) Hhhhhh Aaaaa ii Aaaaaaaa"
1320 "&%%(and (diary-block 2 17 2005 2 23 2005)) Hhhhhh Aaaaa ii Aaaaaaaa")
1323 (icalendar-testsuite--test-export
1324 "&%%(diary-cyclic 7 8 2 2005) 16:00-16:45 [WORK] Pppp"
1326 "DTSTART;VALUE=DATE-TIME:20050208T160000
1327 DTEND;VALUE=DATE-TIME:20050208T164500
1328 RRULE:FREQ=DAILY;INTERVAL=7
1333 (icalendar-testsuite--test-export
1335 ;; FIXME: colon not allowed!
1336 ;;"Nov 1: NNN Wwwwwwww Wwwww - Aaaaaa Pppppppp rrrrrr ddd oo Nnnnnnnn 30"
1337 "Nov 1 NNN Wwwwwwww Wwwww - Aaaaaa Pppppppp rrrrrr ddd oo Nnnnnnnn 30"
1338 "DTSTART;VALUE=DATE:19001101
1339 DTEND;VALUE=DATE:19001102
1340 RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=11;BYMONTHDAY=1
1341 SUMMARY:NNN Wwwwwwww Wwwww - Aaaaaa Pppppppp rrrrrr ddd oo Nnnnnnnn 30
1345 (defun icalendar-testsuite--run-cycle-tests ()
1346 (icalendar-testsuite--test-cycle
1347 "DTSTART;VALUE=DATE-TIME:20030919T090000
1348 DTEND;VALUE=DATE-TIME:20030919T113000
1352 (icalendar-testsuite--test-cycle
1353 "DTSTART;VALUE=DATE-TIME:20030919T090000
1354 DTEND;VALUE=DATE-TIME:20030919T113000
1356 DESCRIPTION:beschreibung!
1361 ;; FIXME: does not work
1362 ;; (icalendar-testsuite--test-cycle
1363 ;; "DTSTART;VALUE=DATE:19190909
1364 ;;DTEND;VALUE=DATE:19190910
1365 ;;RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=09;BYMONTHDAY=09
1366 ;;SUMMARY:and diary-anniversary
1371 (provide 'icalendar-testsuite
)
1373 ;; arch-tag: 33a98396-90e9-49c8-b0e9-b606386d6e8c
1374 ;;; icalendar-testsuite.el ends here