aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog22
-rw-r--r--test/automated/icalendar-tests.el411
2 files changed, 238 insertions, 195 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index add4d9c7664..11b3d9b5e2d 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,25 @@
12011-07-26 Ulf Jasper <ulf.jasper@web.de>
2
3 * automated/icalendar-tests.el (icalendar-tests--compare-strings):
4 Removed, simply use string=.
5 (icalendar--diarytime-to-isotime)
6 (icalendar--datetime-to-diary-date)
7 (icalendar--datestring-to-isodate)
8 (icalendar--format-ical-event)
9 (icalendar--parse-summary-and-rest)
10 (icalendar-tests--do-test-import)
11 (icalendar-tests--do-test-cycle) : Changed argument order of
12 string= to EXPECTED ACTUAL.
13 (icalendar--import-format-sample)
14 (icalendar--format-ical-event)
15 (icalendar-import-non-recurring)
16 (icalendar-import-rrule)
17 (icalendar-import-duration)
18 (icalendar-import-bug-6766)
19 (icalendar-real-world): Adjusted to string= instead of
20 icalendar-tests--compare-strings.
21 (icalendar-import-multiple-vcalendars): New.
22
12011-05-11 Teodor Zlatanov <tzz@lifelogs.com> 232011-05-11 Teodor Zlatanov <tzz@lifelogs.com>
2 24
3 * automated/gnus-tests.el: Add wrapper for Gnus tests. 25 * automated/gnus-tests.el: Add wrapper for Gnus tests.
diff --git a/test/automated/icalendar-tests.el b/test/automated/icalendar-tests.el
index d586230f642..04fce7383fd 100644
--- a/test/automated/icalendar-tests.el
+++ b/test/automated/icalendar-tests.el
@@ -51,35 +51,6 @@
51 (replace-regexp-in-string "[ \t\n]+\\'" "" 51 (replace-regexp-in-string "[ \t\n]+\\'" ""
52 (replace-regexp-in-string "\\`[ \t\n]+" "" string))) 52 (replace-regexp-in-string "\\`[ \t\n]+" "" string)))
53 53
54(defun icalendar-tests--compare-strings (str1 str2)
55 "Compare strings STR1 and STR2.
56Return t if strings are equal, else return substring indicating first difference.
57FIXME: make this a little smarter."
58 (let* ((s1 (icalendar-tests--trim str1))
59 (s2 (icalendar-tests--trim str2))
60 (result (compare-strings s1 0 nil s2 0 nil))
61 (len (length str2)))
62 (if (numberp result)
63 (if (> result 0)
64 (concat "..." (substring str2 (- result 1)
65 (min len (+ (- result 1) 3))) "...")
66 (concat "..." (substring str2 (- (+ result 1))
67 (min len (+ (- (+ result 1)) 3))) "..."))
68 t)))
69
70(ert-deftest icalendar-tests--compare-strings ()
71 "Test icalendar-tests--compare-strings."
72 (should (equal t (icalendar-tests--compare-strings " abcde" "abcde ")))
73 (should
74 (string= "...def..."
75 (icalendar-tests--compare-strings "abcxe" "abcdefghijklmn")))
76 (should (string= "...xe..."
77 (icalendar-tests--compare-strings "abcde" "abcxe")))
78 (should (string= "...ddd..."
79 (icalendar-tests--compare-strings "abc" "abcdddddd")))
80 (should (string= "......"
81 (icalendar-tests--compare-strings "abcdefghij" "abc"))))
82
83;; ====================================================================== 54;; ======================================================================
84;; Tests of functions 55;; Tests of functions
85;; ====================================================================== 56;; ======================================================================
@@ -269,85 +240,85 @@ END:VTIMEZONE
269 240
270(ert-deftest icalendar--diarytime-to-isotime () 241(ert-deftest icalendar--diarytime-to-isotime ()
271 "Test method for `icalendar--diarytime-to-isotime'." 242 "Test method for `icalendar--diarytime-to-isotime'."
272 (should (string= (icalendar--diarytime-to-isotime "01:15" "") 243 (should (string= "T011500"
273 "T011500")) 244 (icalendar--diarytime-to-isotime "01:15" "")))
274 (should (string= (icalendar--diarytime-to-isotime "1:15" "") 245 (should (string= "T011500"
275 "T011500")) 246 (icalendar--diarytime-to-isotime "1:15" "")))
276 (should (string= (icalendar--diarytime-to-isotime "0:01" "") 247 (should (string= "T000100"
277 "T000100")) 248 (icalendar--diarytime-to-isotime "0:01" "")))
278 (should (string= (icalendar--diarytime-to-isotime "0100" "") 249 (should (string= "T010000"
279 "T010000")) 250 (icalendar--diarytime-to-isotime "0100" "")))
280 (should (string= (icalendar--diarytime-to-isotime "0100" "am") 251 (should (string= "T010000"
281 "T010000")) 252 (icalendar--diarytime-to-isotime "0100" "am")))
282 (should (string= (icalendar--diarytime-to-isotime "0100" "pm") 253 (should (string= "T130000"
283 "T130000")) 254 (icalendar--diarytime-to-isotime "0100" "pm")))
284 (should (string= (icalendar--diarytime-to-isotime "1200" "") 255 (should (string= "T120000"
285 "T120000")) 256 (icalendar--diarytime-to-isotime "1200" "")))
286 (should (string= (icalendar--diarytime-to-isotime "17:17" "") 257 (should (string= "T171700"
287 "T171700")) 258 (icalendar--diarytime-to-isotime "17:17" "")))
288 (should (string= (icalendar--diarytime-to-isotime "1200" "am") 259 (should (string= "T000000"
289 "T000000")) 260 (icalendar--diarytime-to-isotime "1200" "am")))
290 (should (string= (icalendar--diarytime-to-isotime "1201" "am") 261 (should (string= "T000100"
291 "T000100")) 262 (icalendar--diarytime-to-isotime "1201" "am")))
292 (should (string= (icalendar--diarytime-to-isotime "1259" "am") 263 (should (string= "T005900"
293 "T005900")) 264 (icalendar--diarytime-to-isotime "1259" "am")))
294 (should (string= (icalendar--diarytime-to-isotime "1200" "pm") 265 (should (string= "T120000"
295 "T120000")) 266 (icalendar--diarytime-to-isotime "1200" "pm")))
296 (should (string= (icalendar--diarytime-to-isotime "1201" "pm") 267 (should (string= "T120100"
297 "T120100")) 268 (icalendar--diarytime-to-isotime "1201" "pm")))
298 (should (string= (icalendar--diarytime-to-isotime "1259" "pm") 269 (should (string= "T125900"
299 "T125900"))) 270 (icalendar--diarytime-to-isotime "1259" "pm"))))
300 271
301(ert-deftest icalendar--datetime-to-diary-date () 272(ert-deftest icalendar--datetime-to-diary-date ()
302 "Test method for `icalendar--datetime-to-diary-date'." 273 "Test method for `icalendar--datetime-to-diary-date'."
303 (let* ((datetime '(59 59 23 31 12 2008)) 274 (let* ((datetime '(59 59 23 31 12 2008))
304 (calendar-date-style 'iso)) 275 (calendar-date-style 'iso))
305 (should (string= (icalendar--datetime-to-diary-date datetime) 276 (should (string= "2008 12 31"
306 "2008 12 31")) 277 (icalendar--datetime-to-diary-date datetime)))
307 (setq calendar-date-style 'european) 278 (setq calendar-date-style 'european)
308 (should (string= (icalendar--datetime-to-diary-date datetime) 279 (should (string= "31 12 2008"
309 "31 12 2008")) 280 (icalendar--datetime-to-diary-date datetime)))
310 (setq calendar-date-style 'american) 281 (setq calendar-date-style 'american)
311 (should (string= (icalendar--datetime-to-diary-date datetime) 282 (should (string= "12 31 2008"
312 "12 31 2008")))) 283 (icalendar--datetime-to-diary-date datetime)))))
313 284
314(ert-deftest icalendar--datestring-to-isodate () 285(ert-deftest icalendar--datestring-to-isodate ()
315 "Test method for `icalendar--datestring-to-isodate'." 286 "Test method for `icalendar--datestring-to-isodate'."
316 (let ((calendar-date-style 'iso)) 287 (let ((calendar-date-style 'iso))
317 ;; numeric iso 288 ;; numeric iso
318 (should (string= (icalendar--datestring-to-isodate "2008 05 11") 289 (should (string= "20080511"
319 "20080511")) 290 (icalendar--datestring-to-isodate "2008 05 11")))
320 (should (string= (icalendar--datestring-to-isodate "2008 05 31") 291 (should (string= "20080531"
321 "20080531")) 292 (icalendar--datestring-to-isodate "2008 05 31")))
322 (should (string= (icalendar--datestring-to-isodate "2008 05 31" 2) 293 (should (string= "20080602"
323 "20080602")) 294 (icalendar--datestring-to-isodate "2008 05 31" 2)))
324 295
325 ;; numeric european 296 ;; numeric european
326 (setq calendar-date-style 'european) 297 (setq calendar-date-style 'european)
327 (should (string= (icalendar--datestring-to-isodate "11 05 2008") 298 (should (string= "20080511"
328 "20080511")) 299 (icalendar--datestring-to-isodate "11 05 2008")))
329 (should (string= (icalendar--datestring-to-isodate "31 05 2008") 300 (should (string= "20080531"
330 "20080531")) 301 (icalendar--datestring-to-isodate "31 05 2008")))
331 (should (string= (icalendar--datestring-to-isodate "31 05 2008" 2) 302 (should (string= "20080602"
332 "20080602")) 303 (icalendar--datestring-to-isodate "31 05 2008" 2)))
333 304
334 ;; numeric american 305 ;; numeric american
335 (setq calendar-date-style 'american) 306 (setq calendar-date-style 'american)
336 (should (string= (icalendar--datestring-to-isodate "11 05 2008") 307 (should (string= "20081105"
337 "20081105")) 308 (icalendar--datestring-to-isodate "11 05 2008")))
338 (should (string= (icalendar--datestring-to-isodate "12 30 2008") 309 (should (string= "20081230"
339 "20081230")) 310 (icalendar--datestring-to-isodate "12 30 2008")))
340 (should (string= (icalendar--datestring-to-isodate "12 30 2008" 2) 311 (should (string= "20090101"
341 "20090101")) 312 (icalendar--datestring-to-isodate "12 30 2008" 2)))
342 313
343 ;; non-numeric 314 ;; non-numeric
344 (setq calendar-date-style nil) ;not necessary for conversion 315 (setq calendar-date-style nil) ;not necessary for conversion
345 (should (string= (icalendar--datestring-to-isodate "Nov 05 2008") 316 (should (string= "20081105"
346 "20081105")) 317 (icalendar--datestring-to-isodate "Nov 05 2008")))
347 (should (string= (icalendar--datestring-to-isodate "05 Nov 2008") 318 (should (string= "20081105"
348 "20081105")) 319 (icalendar--datestring-to-isodate "05 Nov 2008")))
349 (should (string= (icalendar--datestring-to-isodate "2008 Nov 05") 320 (should (string= "20081105"
350 "20081105")))) 321 (icalendar--datestring-to-isodate "2008 Nov 05")))))
351 322
352(ert-deftest icalendar--first-weekday-of-year () 323(ert-deftest icalendar--first-weekday-of-year ()
353 "Test method for `icalendar-first-weekday-of-year'." 324 "Test method for `icalendar-first-weekday-of-year'."
@@ -363,7 +334,9 @@ END:VTIMEZONE
363 334
364(ert-deftest icalendar--import-format-sample () 335(ert-deftest icalendar--import-format-sample ()
365 "Test method for `icalendar-import-format-sample'." 336 "Test method for `icalendar-import-format-sample'."
366 (should (string= (icalendar-import-format-sample 337 (should (string= (concat "SUMMARY=`a' DESCRIPTION=`b' LOCATION=`c' "
338 "ORGANIZER=`d' STATUS=`' URL=`' CLASS=`'")
339 (icalendar-import-format-sample
367 (icalendar-tests--get-ical-event "BEGIN:VEVENT 340 (icalendar-tests--get-ical-event "BEGIN:VEVENT
368DTSTAMP:20030509T043439Z 341DTSTAMP:20030509T043439Z
369DTSTART:20030509T103000 342DTSTART:20030509T103000
@@ -373,9 +346,7 @@ LOCATION:c
373DTEND:20030509T153000 346DTEND:20030509T153000
374DESCRIPTION:b 347DESCRIPTION:b
375END:VEVENT 348END:VEVENT
376")) 349")))))
377 (concat "SUMMARY=`a' DESCRIPTION=`b' LOCATION=`c' "
378 "ORGANIZER=`d' STATUS=`' URL=`' CLASS=`'"))))
379 350
380(ert-deftest icalendar--format-ical-event () 351(ert-deftest icalendar--format-ical-event ()
381 "Test `icalendar--format-ical-event'." 352 "Test `icalendar--format-ical-event'."
@@ -397,12 +368,11 @@ DTEND:20030509T153000
397DESCRIPTION:des 368DESCRIPTION:des
398END:VEVENT 369END:VEVENT
399"))) 370")))
400 (should (string= (icalendar--format-ical-event event) 371 (should (string= "SUM sum DES des LOC loc ORG org"
401 "SUM sum DES des LOC loc ORG org")) 372 (icalendar--format-ical-event event)))
402 (setq icalendar-import-format (lambda (&rest ignore) 373 (setq icalendar-import-format (lambda (&rest ignore)
403 "helloworld")) 374 "helloworld"))
404 (should (string= (icalendar--format-ical-event event) 375 (should (string= "helloworld" (icalendar--format-ical-event event)))
405 "helloworld"))
406 (setq icalendar-import-format 376 (setq icalendar-import-format
407 (lambda (e) 377 (lambda (e)
408 (format "-%s-%s-%s-%s-%s-%s-%s-" 378 (format "-%s-%s-%s-%s-%s-%s-%s-"
@@ -413,8 +383,8 @@ END:VEVENT
413 (icalendar--get-event-property event 'STATUS) 383 (icalendar--get-event-property event 'STATUS)
414 (icalendar--get-event-property event 'URL) 384 (icalendar--get-event-property event 'URL)
415 (icalendar--get-event-property event 'CLASS)))) 385 (icalendar--get-event-property event 'CLASS))))
416 (should (string= (icalendar--format-ical-event event) 386 (should (string= "-sum-des-loc-org-nil-nil-nil-"
417 "-sum-des-loc-org-nil-nil-nil-")))) 387 (icalendar--format-ical-event event)))))
418 388
419(ert-deftest icalendar--parse-summary-and-rest () 389(ert-deftest icalendar--parse-summary-and-rest ()
420 "Test `icalendar--parse-summary-and-rest'." 390 "Test `icalendar--parse-summary-and-rest'."
@@ -428,15 +398,15 @@ END:VEVENT
428 (icalendar-import-format-class " CLA %s") 398 (icalendar-import-format-class " CLA %s")
429 (result)) 399 (result))
430 (setq result (icalendar--parse-summary-and-rest "SUM sum ORG org")) 400 (setq result (icalendar--parse-summary-and-rest "SUM sum ORG org"))
431 (should (string= (cdr (assoc 'org result)) "org")) 401 (should (string= "org" (cdr (assoc 'org result))))
432 402
433 (setq result (icalendar--parse-summary-and-rest 403 (setq result (icalendar--parse-summary-and-rest
434 "SUM sum DES des LOC loc ORG org STA sta URL url CLA cla")) 404 "SUM sum DES des LOC loc ORG org STA sta URL url CLA cla"))
435 (should (string= (cdr (assoc 'des result)) "des")) 405 (should (string= "des" (cdr (assoc 'des result))))
436 (should (string= (cdr (assoc 'loc result)) "loc")) 406 (should (string= "loc" (cdr (assoc 'loc result))))
437 (should (string= (cdr (assoc 'org result)) "org")) 407 (should (string= "org" (cdr (assoc 'org result))))
438 (should (string= (cdr (assoc 'sta result)) "sta")) 408 (should (string= "sta" (cdr (assoc 'sta result))))
439 (should (string= (cdr (assoc 'cla result)) "cla")) 409 (should (string= "cla" (cdr (assoc 'cla result))))
440 410
441 (setq icalendar-import-format (lambda () "Hello world")) 411 (setq icalendar-import-format (lambda () "Hello world"))
442 (setq result (icalendar--parse-summary-and-rest 412 (setq result (icalendar--parse-summary-and-rest
@@ -738,12 +708,10 @@ Argument INPUT input icalendar string.
738Argument EXPECTED-OUTPUT expected diary string." 708Argument EXPECTED-OUTPUT expected diary string."
739 (let ((temp-file (make-temp-file "icalendar-test-diary"))) 709 (let ((temp-file (make-temp-file "icalendar-test-diary")))
740 (icalendar-import-buffer temp-file t t) 710 (icalendar-import-buffer temp-file t t)
741 (unwind-protect 711 (save-excursion
742 (save-excursion 712 (find-file temp-file)
743 (find-file temp-file) 713 (let ((result (buffer-substring-no-properties (point-min) (point-max))))
744 (let ((result (buffer-substring-no-properties (point-min) (point-max)))) 714 (should (string= expected-output result)))
745 (should (icalendar-tests--compare-strings result
746 expected-output))))
747 (kill-buffer (find-buffer-visiting temp-file)) 715 (kill-buffer (find-buffer-visiting temp-file))
748 (delete-file temp-file)))) 716 (delete-file temp-file))))
749 717
@@ -753,23 +721,23 @@ Argument EXPECTED-OUTPUT expected diary string."
753 "SUMMARY:non-recurring 721 "SUMMARY:non-recurring
754DTSTART;VALUE=DATE-TIME:20030919T090000 722DTSTART;VALUE=DATE-TIME:20030919T090000
755DTEND;VALUE=DATE-TIME:20030919T113000" 723DTEND;VALUE=DATE-TIME:20030919T113000"
756 "&2003/9/19 09:00-11:30 non-recurring" 724 "&2003/9/19 09:00-11:30 non-recurring\n"
757 "&19/9/2003 09:00-11:30 non-recurring" 725 "&19/9/2003 09:00-11:30 non-recurring\n"
758 "&9/19/2003 09:00-11:30 non-recurring") 726 "&9/19/2003 09:00-11:30 non-recurring\n")
759 (icalendar-tests--test-import 727 (icalendar-tests--test-import
760 "SUMMARY:non-recurring allday 728 "SUMMARY:non-recurring allday
761DTSTART;VALUE=DATE-TIME:20030919" 729DTSTART;VALUE=DATE-TIME:20030919"
762 "&2003/9/19 non-recurring allday" 730 "&2003/9/19 non-recurring allday\n"
763 "&19/9/2003 non-recurring allday" 731 "&19/9/2003 non-recurring allday\n"
764 "&9/19/2003 non-recurring allday") 732 "&9/19/2003 non-recurring allday\n")
765 (icalendar-tests--test-import 733 (icalendar-tests--test-import
766 ;; do not remove the trailing blank after "long"! 734 ;; do not remove the trailing blank after "long"!
767 "SUMMARY:long 735 "SUMMARY:long
768 summary 736 summary
769DTSTART;VALUE=DATE:20030919" 737DTSTART;VALUE=DATE:20030919"
770 "&2003/9/19 long summary" 738 "&2003/9/19 long summary\n"
771 "&19/9/2003 long summary" 739 "&19/9/2003 long summary\n"
772 "&9/19/2003 long summary") 740 "&9/19/2003 long summary\n")
773 (icalendar-tests--test-import 741 (icalendar-tests--test-import
774 "UID:748f2da0-0d9b-11d8-97af-b4ec8686ea61 742 "UID:748f2da0-0d9b-11d8-97af-b4ec8686ea61
775SUMMARY:Sommerferien 743SUMMARY:Sommerferien
@@ -791,7 +759,8 @@ DTSTAMP:20031103T011641Z
791" 759"
792 "&%%(and (diary-block 7 19 2004 8 27 2004)) Sommerferien 760 "&%%(and (diary-block 7 19 2004 8 27 2004)) Sommerferien
793 Status: TENTATIVE 761 Status: TENTATIVE
794 Class: PRIVATE") 762 Class: PRIVATE
763")
795 (icalendar-tests--test-import 764 (icalendar-tests--test-import
796 "UID 765 "UID
797 :04979712-3902-11d9-93dd-8f9f4afe08da 766 :04979712-3902-11d9-93dd-8f9f4afe08da
@@ -814,13 +783,13 @@ LAST-MODIFIED
814" 783"
815 "&2004/11/23 14:00-14:30 folded summary 784 "&2004/11/23 14:00-14:30 folded summary
816 Status: TENTATIVE 785 Status: TENTATIVE
817 Class: PRIVATE" 786 Class: PRIVATE\n"
818 "&23/11/2004 14:00-14:30 folded summary 787 "&23/11/2004 14:00-14:30 folded summary
819 Status: TENTATIVE 788 Status: TENTATIVE
820 Class: PRIVATE" 789 Class: PRIVATE\n"
821 "&11/23/2004 14:00-14:30 folded summary 790 "&11/23/2004 14:00-14:30 folded summary
822 Status: TENTATIVE 791 Status: TENTATIVE
823 Class: PRIVATE") 792 Class: PRIVATE\n")
824 793
825 (icalendar-tests--test-import 794 (icalendar-tests--test-import
826 "UID 795 "UID
@@ -842,13 +811,13 @@ DTSTAMP
842" 811"
843 "&2004/11/23 14:45-15:45 another example 812 "&2004/11/23 14:45-15:45 another example
844 Status: TENTATIVE 813 Status: TENTATIVE
845 Class: PRIVATE" 814 Class: PRIVATE\n"
846 "&23/11/2004 14:45-15:45 another example 815 "&23/11/2004 14:45-15:45 another example
847 Status: TENTATIVE 816 Status: TENTATIVE
848 Class: PRIVATE" 817 Class: PRIVATE\n"
849 "&11/23/2004 14:45-15:45 another example 818 "&11/23/2004 14:45-15:45 another example
850 Status: TENTATIVE 819 Status: TENTATIVE
851 Class: PRIVATE")) 820 Class: PRIVATE\n"))
852 821
853(ert-deftest icalendar-import-rrule () 822(ert-deftest icalendar-import-rrule ()
854 (icalendar-tests--test-import 823 (icalendar-tests--test-import
@@ -857,9 +826,9 @@ DTSTART;VALUE=DATE-TIME:20030919T090000
857DTEND;VALUE=DATE-TIME:20030919T113000 826DTEND;VALUE=DATE-TIME:20030919T113000
858RRULE:FREQ=DAILY; 827RRULE:FREQ=DAILY;
859" 828"
860 "&%%(and (diary-cyclic 1 2003 9 19)) 09:00-11:30 rrule daily" 829 "&%%(and (diary-cyclic 1 2003 9 19)) 09:00-11:30 rrule daily\n"
861 "&%%(and (diary-cyclic 1 19 9 2003)) 09:00-11:30 rrule daily" 830 "&%%(and (diary-cyclic 1 19 9 2003)) 09:00-11:30 rrule daily\n"
862 "&%%(and (diary-cyclic 1 9 19 2003)) 09:00-11:30 rrule daily") 831 "&%%(and (diary-cyclic 1 9 19 2003)) 09:00-11:30 rrule daily\n")
863 ;; RRULE examples 832 ;; RRULE examples
864 (icalendar-tests--test-import 833 (icalendar-tests--test-import
865 "SUMMARY:rrule daily 834 "SUMMARY:rrule daily
@@ -867,9 +836,9 @@ DTSTART;VALUE=DATE-TIME:20030919T090000
867DTEND;VALUE=DATE-TIME:20030919T113000 836DTEND;VALUE=DATE-TIME:20030919T113000
868RRULE:FREQ=DAILY;INTERVAL=2 837RRULE:FREQ=DAILY;INTERVAL=2
869" 838"
870 "&%%(and (diary-cyclic 2 2003 9 19)) 09:00-11:30 rrule daily" 839 "&%%(and (diary-cyclic 2 2003 9 19)) 09:00-11:30 rrule daily\n"
871 "&%%(and (diary-cyclic 2 19 9 2003)) 09:00-11:30 rrule daily" 840 "&%%(and (diary-cyclic 2 19 9 2003)) 09:00-11:30 rrule daily\n"
872 "&%%(and (diary-cyclic 2 9 19 2003)) 09:00-11:30 rrule daily") 841 "&%%(and (diary-cyclic 2 9 19 2003)) 09:00-11:30 rrule daily\n")
873 (icalendar-tests--test-import 842 (icalendar-tests--test-import
874 "SUMMARY:rrule daily with exceptions 843 "SUMMARY:rrule daily with exceptions
875DTSTART;VALUE=DATE-TIME:20030919T090000 844DTSTART;VALUE=DATE-TIME:20030919T090000
@@ -877,36 +846,36 @@ DTEND;VALUE=DATE-TIME:20030919T113000
877RRULE:FREQ=DAILY;INTERVAL=2 846RRULE:FREQ=DAILY;INTERVAL=2
878EXDATE:20030921,20030925 847EXDATE:20030921,20030925
879" 848"
880 "&%%(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" 849 "&%%(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\n"
881 "&%%(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" 850 "&%%(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\n"
882 "&%%(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") 851 "&%%(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\n")
883 (icalendar-tests--test-import 852 (icalendar-tests--test-import
884 "SUMMARY:rrule weekly 853 "SUMMARY:rrule weekly
885DTSTART;VALUE=DATE-TIME:20030919T090000 854DTSTART;VALUE=DATE-TIME:20030919T090000
886DTEND;VALUE=DATE-TIME:20030919T113000 855DTEND;VALUE=DATE-TIME:20030919T113000
887RRULE:FREQ=WEEKLY; 856RRULE:FREQ=WEEKLY;
888" 857"
889 "&%%(and (diary-cyclic 7 2003 9 19)) 09:00-11:30 rrule weekly" 858 "&%%(and (diary-cyclic 7 2003 9 19)) 09:00-11:30 rrule weekly\n"
890 "&%%(and (diary-cyclic 7 19 9 2003)) 09:00-11:30 rrule weekly" 859 "&%%(and (diary-cyclic 7 19 9 2003)) 09:00-11:30 rrule weekly\n"
891 "&%%(and (diary-cyclic 7 9 19 2003)) 09:00-11:30 rrule weekly") 860 "&%%(and (diary-cyclic 7 9 19 2003)) 09:00-11:30 rrule weekly\n")
892 (icalendar-tests--test-import 861 (icalendar-tests--test-import
893 "SUMMARY:rrule monthly no end 862 "SUMMARY:rrule monthly no end
894DTSTART;VALUE=DATE-TIME:20030919T090000 863DTSTART;VALUE=DATE-TIME:20030919T090000
895DTEND;VALUE=DATE-TIME:20030919T113000 864DTEND;VALUE=DATE-TIME:20030919T113000
896RRULE:FREQ=MONTHLY; 865RRULE:FREQ=MONTHLY;
897" 866"
898 "&%%(and (diary-date t t 19) (diary-block 2003 9 19 9999 1 1)) 09:00-11:30 rrule monthly no end" 867 "&%%(and (diary-date t t 19) (diary-block 2003 9 19 9999 1 1)) 09:00-11:30 rrule monthly no end\n"
899 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 1 1 9999)) 09:00-11:30 rrule monthly no end" 868 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 1 1 9999)) 09:00-11:30 rrule monthly no end\n"
900 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 1 1 9999)) 09:00-11:30 rrule monthly no end") 869 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 1 1 9999)) 09:00-11:30 rrule monthly no end\n")
901 (icalendar-tests--test-import 870 (icalendar-tests--test-import
902 "SUMMARY:rrule monthly with end 871 "SUMMARY:rrule monthly with end
903DTSTART;VALUE=DATE-TIME:20030919T090000 872DTSTART;VALUE=DATE-TIME:20030919T090000
904DTEND;VALUE=DATE-TIME:20030919T113000 873DTEND;VALUE=DATE-TIME:20030919T113000
905RRULE:FREQ=MONTHLY;UNTIL=20050819; 874RRULE:FREQ=MONTHLY;UNTIL=20050819;
906" 875"
907 "&%%(and (diary-date t t 19) (diary-block 2003 9 19 2005 8 19)) 09:00-11:30 rrule monthly with end" 876 "&%%(and (diary-date t t 19) (diary-block 2003 9 19 2005 8 19)) 09:00-11:30 rrule monthly with end\n"
908 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 8 2005)) 09:00-11:30 rrule monthly with end" 877 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 8 2005)) 09:00-11:30 rrule monthly with end\n"
909 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 8 19 2005)) 09:00-11:30 rrule monthly with end") 878 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 8 19 2005)) 09:00-11:30 rrule monthly with end\n")
910 (icalendar-tests--test-import 879 (icalendar-tests--test-import
911 "DTSTART;VALUE=DATE:20040815 880 "DTSTART;VALUE=DATE:20040815
912DTEND;VALUE=DATE:20040816 881DTEND;VALUE=DATE:20040816
@@ -914,81 +883,81 @@ SUMMARY:Maria Himmelfahrt
914UID:CC56BEA6-49D2-11D8-8833-00039386D1C2-RID 883UID:CC56BEA6-49D2-11D8-8833-00039386D1C2-RID
915RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=8 884RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=8
916" 885"
917 "&%%(and (diary-anniversary 2004 8 15)) Maria Himmelfahrt" 886 "&%%(and (diary-anniversary 2004 8 15)) Maria Himmelfahrt\n"
918 "&%%(and (diary-anniversary 15 8 2004)) Maria Himmelfahrt" 887 "&%%(and (diary-anniversary 15 8 2004)) Maria Himmelfahrt\n"
919 "&%%(and (diary-anniversary 8 15 2004)) Maria Himmelfahrt") 888 "&%%(and (diary-anniversary 8 15 2004)) Maria Himmelfahrt\n")
920 (icalendar-tests--test-import 889 (icalendar-tests--test-import
921 "SUMMARY:rrule yearly 890 "SUMMARY:rrule yearly
922DTSTART;VALUE=DATE-TIME:20030919T090000 891DTSTART;VALUE=DATE-TIME:20030919T090000
923DTEND;VALUE=DATE-TIME:20030919T113000 892DTEND;VALUE=DATE-TIME:20030919T113000
924RRULE:FREQ=YEARLY;INTERVAL=2 893RRULE:FREQ=YEARLY;INTERVAL=2
925" 894"
926 "&%%(and (diary-anniversary 2003 9 19)) 09:00-11:30 rrule yearly" ;FIXME 895 "&%%(and (diary-anniversary 2003 9 19)) 09:00-11:30 rrule yearly\n" ;FIXME
927 "&%%(and (diary-anniversary 19 9 2003)) 09:00-11:30 rrule yearly" ;FIXME 896 "&%%(and (diary-anniversary 19 9 2003)) 09:00-11:30 rrule yearly\n" ;FIXME
928 "&%%(and (diary-anniversary 9 19 2003)) 09:00-11:30 rrule yearly") ;FIXME 897 "&%%(and (diary-anniversary 9 19 2003)) 09:00-11:30 rrule yearly\n") ;FIXME
929 (icalendar-tests--test-import 898 (icalendar-tests--test-import
930 "SUMMARY:rrule count daily short 899 "SUMMARY:rrule count daily short
931DTSTART;VALUE=DATE-TIME:20030919T090000 900DTSTART;VALUE=DATE-TIME:20030919T090000
932DTEND;VALUE=DATE-TIME:20030919T113000 901DTEND;VALUE=DATE-TIME:20030919T113000
933RRULE:FREQ=DAILY;COUNT=1;INTERVAL=1 902RRULE:FREQ=DAILY;COUNT=1;INTERVAL=1
934" 903"
935 "&%%(and (diary-cyclic 1 2003 9 19) (diary-block 2003 9 19 2003 9 19)) 09:00-11:30 rrule count daily short" 904 "&%%(and (diary-cyclic 1 2003 9 19) (diary-block 2003 9 19 2003 9 19)) 09:00-11:30 rrule count daily short\n"
936 "&%%(and (diary-cyclic 1 19 9 2003) (diary-block 19 9 2003 19 9 2003)) 09:00-11:30 rrule count daily short" 905 "&%%(and (diary-cyclic 1 19 9 2003) (diary-block 19 9 2003 19 9 2003)) 09:00-11:30 rrule count daily short\n"
937 "&%%(and (diary-cyclic 1 9 19 2003) (diary-block 9 19 2003 9 19 2003)) 09:00-11:30 rrule count daily short") 906 "&%%(and (diary-cyclic 1 9 19 2003) (diary-block 9 19 2003 9 19 2003)) 09:00-11:30 rrule count daily short\n")
938 (icalendar-tests--test-import 907 (icalendar-tests--test-import
939 "SUMMARY:rrule count daily long 908 "SUMMARY:rrule count daily long
940DTSTART;VALUE=DATE-TIME:20030919T090000 909DTSTART;VALUE=DATE-TIME:20030919T090000
941DTEND;VALUE=DATE-TIME:20030919T113000 910DTEND;VALUE=DATE-TIME:20030919T113000
942RRULE:FREQ=DAILY;COUNT=14;INTERVAL=1 911RRULE:FREQ=DAILY;COUNT=14;INTERVAL=1
943" 912"
944 "&%%(and (diary-cyclic 1 2003 9 19) (diary-block 2003 9 19 2003 10 2)) 09:00-11:30 rrule count daily long" 913 "&%%(and (diary-cyclic 1 2003 9 19) (diary-block 2003 9 19 2003 10 2)) 09:00-11:30 rrule count daily long\n"
945 "&%%(and (diary-cyclic 1 19 9 2003) (diary-block 19 9 2003 2 10 2003)) 09:00-11:30 rrule count daily long" 914 "&%%(and (diary-cyclic 1 19 9 2003) (diary-block 19 9 2003 2 10 2003)) 09:00-11:30 rrule count daily long\n"
946 "&%%(and (diary-cyclic 1 9 19 2003) (diary-block 9 19 2003 10 2 2003)) 09:00-11:30 rrule count daily long") 915 "&%%(and (diary-cyclic 1 9 19 2003) (diary-block 9 19 2003 10 2 2003)) 09:00-11:30 rrule count daily long\n")
947 (icalendar-tests--test-import 916 (icalendar-tests--test-import
948 "SUMMARY:rrule count bi-weekly 3 times 917 "SUMMARY:rrule count bi-weekly 3 times
949DTSTART;VALUE=DATE-TIME:20030919T090000 918DTSTART;VALUE=DATE-TIME:20030919T090000
950DTEND;VALUE=DATE-TIME:20030919T113000 919DTEND;VALUE=DATE-TIME:20030919T113000
951RRULE:FREQ=WEEKLY;COUNT=3;INTERVAL=2 920RRULE:FREQ=WEEKLY;COUNT=3;INTERVAL=2
952" 921"
953 "&%%(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" 922 "&%%(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\n"
954 "&%%(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" 923 "&%%(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\n"
955 "&%%(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") 924 "&%%(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\n")
956 (icalendar-tests--test-import 925 (icalendar-tests--test-import
957 "SUMMARY:rrule count monthly 926 "SUMMARY:rrule count monthly
958DTSTART;VALUE=DATE-TIME:20030919T090000 927DTSTART;VALUE=DATE-TIME:20030919T090000
959DTEND;VALUE=DATE-TIME:20030919T113000 928DTEND;VALUE=DATE-TIME:20030919T113000
960RRULE:FREQ=MONTHLY;INTERVAL=1;COUNT=5 929RRULE:FREQ=MONTHLY;INTERVAL=1;COUNT=5
961" 930"
962 "&%%(and (diary-date t t 19) (diary-block 2003 9 19 2004 1 19)) 09:00-11:30 rrule count monthly" 931 "&%%(and (diary-date t t 19) (diary-block 2003 9 19 2004 1 19)) 09:00-11:30 rrule count monthly\n"
963 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 1 2004)) 09:00-11:30 rrule count monthly" 932 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 1 2004)) 09:00-11:30 rrule count monthly\n"
964 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 1 19 2004)) 09:00-11:30 rrule count monthly") 933 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 1 19 2004)) 09:00-11:30 rrule count monthly\n")
965 (icalendar-tests--test-import 934 (icalendar-tests--test-import
966 "SUMMARY:rrule count every second month 935 "SUMMARY:rrule count every second month
967DTSTART;VALUE=DATE-TIME:20030919T090000 936DTSTART;VALUE=DATE-TIME:20030919T090000
968DTEND;VALUE=DATE-TIME:20030919T113000 937DTEND;VALUE=DATE-TIME:20030919T113000
969RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=5 938RRULE:FREQ=MONTHLY;INTERVAL=2;COUNT=5
970" 939"
971 "&%%(and (diary-date t t 19) (diary-block 2003 9 19 2004 5 19)) 09:00-11:30 rrule count every second month" ;FIXME 940 "&%%(and (diary-date t t 19) (diary-block 2003 9 19 2004 5 19)) 09:00-11:30 rrule count every second month\n" ;FIXME
972 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 5 2004)) 09:00-11:30 rrule count every second month" ;FIXME 941 "&%%(and (diary-date 19 t t) (diary-block 19 9 2003 19 5 2004)) 09:00-11:30 rrule count every second month\n" ;FIXME
973 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 5 19 2004)) 09:00-11:30 rrule count every second month") ;FIXME 942 "&%%(and (diary-date t 19 t) (diary-block 9 19 2003 5 19 2004)) 09:00-11:30 rrule count every second month\n") ;FIXME
974 (icalendar-tests--test-import 943 (icalendar-tests--test-import
975 "SUMMARY:rrule count yearly 944 "SUMMARY:rrule count yearly
976DTSTART;VALUE=DATE-TIME:20030919T090000 945DTSTART;VALUE=DATE-TIME:20030919T090000
977DTEND;VALUE=DATE-TIME:20030919T113000 946DTEND;VALUE=DATE-TIME:20030919T113000
978RRULE:FREQ=YEARLY;INTERVAL=1;COUNT=5 947RRULE:FREQ=YEARLY;INTERVAL=1;COUNT=5
979" 948"
980 "&%%(and (diary-date t 9 19) (diary-block 2003 9 19 2007 9 19)) 09:00-11:30 rrule count yearly" 949 "&%%(and (diary-date t 9 19) (diary-block 2003 9 19 2007 9 19)) 09:00-11:30 rrule count yearly\n"
981 "&%%(and (diary-date 19 9 t) (diary-block 19 9 2003 19 9 2007)) 09:00-11:30 rrule count yearly" 950 "&%%(and (diary-date 19 9 t) (diary-block 19 9 2003 19 9 2007)) 09:00-11:30 rrule count yearly\n"
982 "&%%(and (diary-date 9 19 t) (diary-block 9 19 2003 9 19 2007)) 09:00-11:30 rrule count yearly") 951 "&%%(and (diary-date 9 19 t) (diary-block 9 19 2003 9 19 2007)) 09:00-11:30 rrule count yearly\n")
983 (icalendar-tests--test-import 952 (icalendar-tests--test-import
984 "SUMMARY:rrule count every second year 953 "SUMMARY:rrule count every second year
985DTSTART;VALUE=DATE-TIME:20030919T090000 954DTSTART;VALUE=DATE-TIME:20030919T090000
986DTEND;VALUE=DATE-TIME:20030919T113000 955DTEND;VALUE=DATE-TIME:20030919T113000
987RRULE:FREQ=YEARLY;INTERVAL=2;COUNT=5 956RRULE:FREQ=YEARLY;INTERVAL=2;COUNT=5
988" 957"
989 "&%%(and (diary-date t 9 19) (diary-block 2003 9 19 2011 9 19)) 09:00-11:30 rrule count every second year" ;FIXME!!! 958 "&%%(and (diary-date t 9 19) (diary-block 2003 9 19 2011 9 19)) 09:00-11:30 rrule count every second year\n" ;FIXME!!!
990 "&%%(and (diary-date 19 9 t) (diary-block 19 9 2003 19 9 2011)) 09:00-11:30 rrule count every second year" ;FIXME!!! 959 "&%%(and (diary-date 19 9 t) (diary-block 19 9 2003 19 9 2011)) 09:00-11:30 rrule count every second year\n" ;FIXME!!!
991 "&%%(and (diary-date 9 19 t) (diary-block 9 19 2003 9 19 2011)) 09:00-11:30 rrule count every second year") ;FIXME!!! 960 "&%%(and (diary-date 9 19 t) (diary-block 9 19 2003 9 19 2011)) 09:00-11:30 rrule count every second year\n") ;FIXME!!!
992) 961)
993 962
994(ert-deftest icalendar-import-duration () 963(ert-deftest icalendar-import-duration ()
@@ -998,9 +967,9 @@ RRULE:FREQ=YEARLY;INTERVAL=2;COUNT=5
998SUMMARY:duration 967SUMMARY:duration
999DURATION:P7D 968DURATION:P7D
1000" 969"
1001 "&%%(and (diary-block 2005 2 17 2005 2 23)) duration" 970 "&%%(and (diary-block 2005 2 17 2005 2 23)) duration\n"
1002 "&%%(and (diary-block 17 2 2005 23 2 2005)) duration" 971 "&%%(and (diary-block 17 2 2005 23 2 2005)) duration\n"
1003 "&%%(and (diary-block 2 17 2005 2 23 2005)) duration") 972 "&%%(and (diary-block 2 17 2005 2 23 2005)) duration\n")
1004 (icalendar-tests--test-import 973 (icalendar-tests--test-import
1005 "UID:20041127T183329Z-18215-1001-4536-49109@andromeda 974 "UID:20041127T183329Z-18215-1001-4536-49109@andromeda
1006DTSTAMP:20041127T183315Z 975DTSTAMP:20041127T183315Z
@@ -1014,11 +983,11 @@ SEQUENCE:1
1014CREATED:20041127T183329 983CREATED:20041127T183329
1015" 984"
1016 "&%%(and (diary-cyclic 1 2001 12 21) (diary-block 2001 12 21 2001 12 29)) Urlaub 985 "&%%(and (diary-cyclic 1 2001 12 21) (diary-block 2001 12 21 2001 12 29)) Urlaub
1017 Class: PUBLIC" 986 Class: PUBLIC\n"
1018 "&%%(and (diary-cyclic 1 21 12 2001) (diary-block 21 12 2001 29 12 2001)) Urlaub 987 "&%%(and (diary-cyclic 1 21 12 2001) (diary-block 21 12 2001 29 12 2001)) Urlaub
1019 Class: PUBLIC" 988 Class: PUBLIC\n"
1020 "&%%(and (diary-cyclic 1 12 21 2001) (diary-block 12 21 2001 12 29 2001)) Urlaub 989 "&%%(and (diary-cyclic 1 12 21 2001) (diary-block 12 21 2001 12 29 2001)) Urlaub
1021 Class: PUBLIC")) 990 Class: PUBLIC\n"))
1022 991
1023(ert-deftest icalendar-import-bug-6766 () 992(ert-deftest icalendar-import-bug-6766 ()
1024 ;;bug#6766 -- multiple byday values in a weekly rrule 993 ;;bug#6766 -- multiple byday values in a weekly rrule
@@ -1049,20 +1018,62 @@ UID:8814e3f9-7482-408f-996c-3bfe486a1263
1049 Status: CONFIRMED 1018 Status: CONFIRMED
1050 Class: PUBLIC 1019 Class: PUBLIC
1051&%%(and (memq (calendar-day-of-week date) '(2 4)) (diary-cyclic 1 2010 4 22)) Tues + Thurs thinking 1020&%%(and (memq (calendar-day-of-week date) '(2 4)) (diary-cyclic 1 2010 4 22)) Tues + Thurs thinking
1052 Class: PUBLIC" 1021 Class: PUBLIC
1053 1022"
1054"&%%(and (memq (calendar-day-of-week date) '(1 3 4 5)) (diary-cyclic 1 21 4 2010)) 11:30-12:00 Scrum 1023"&%%(and (memq (calendar-day-of-week date) '(1 3 4 5)) (diary-cyclic 1 21 4 2010)) 11:30-12:00 Scrum
1055 Status: CONFIRMED 1024 Status: CONFIRMED
1056 Class: PUBLIC 1025 Class: PUBLIC
1057&%%(and (memq (calendar-day-of-week date) '(2 4)) (diary-cyclic 1 22 4 2010)) Tues + Thurs thinking 1026&%%(and (memq (calendar-day-of-week date) '(2 4)) (diary-cyclic 1 22 4 2010)) Tues + Thurs thinking
1058 Class: PUBLIC" 1027 Class: PUBLIC
1059 1028"
1060"&%%(and (memq (calendar-day-of-week date) '(1 3 4 5)) (diary-cyclic 1 4 21 2010)) 11:30-12:00 Scrum 1029"&%%(and (memq (calendar-day-of-week date) '(1 3 4 5)) (diary-cyclic 1 4 21 2010)) 11:30-12:00 Scrum
1061 Status: CONFIRMED 1030 Status: CONFIRMED
1062 Class: PUBLIC 1031 Class: PUBLIC
1063&%%(and (memq (calendar-day-of-week date) '(2 4)) (diary-cyclic 1 4 22 2010)) Tues + Thurs thinking 1032&%%(and (memq (calendar-day-of-week date) '(2 4)) (diary-cyclic 1 4 22 2010)) Tues + Thurs thinking
1064 Class: PUBLIC")) 1033 Class: PUBLIC
1034"))
1065 1035
1036(ert-deftest icalendar-import-multiple-vcalendars ()
1037 (icalendar-tests--test-import
1038 "DTSTART;VALUE=DATE:20110723
1039SUMMARY:event-1
1040"
1041 "&2011/7/23 event-1\n"
1042 "&23/7/2011 event-1\n"
1043 "&7/23/2011 event-1\n")
1044
1045 (icalendar-tests--test-import
1046 "BEGIN:VCALENDAR
1047PRODID:-//Emacs//NONSGML icalendar.el//EN
1048VERSION:2.0\nBEGIN:VEVENT
1049DTSTART;VALUE=DATE:20110723
1050SUMMARY:event-1
1051END:VEVENT
1052END:VCALENDAR
1053BEGIN:VCALENDAR
1054PRODID:-//Emacs//NONSGML icalendar.el//EN
1055VERSION:2.0
1056BEGIN:VEVENT
1057DTSTART;VALUE=DATE:20110724
1058SUMMARY:event-2
1059END:VEVENT
1060END:VCALENDAR
1061BEGIN:VCALENDAR
1062PRODID:-//Emacs//NONSGML icalendar.el//EN
1063VERSION:2.0
1064BEGIN:VEVENT
1065DTSTART;VALUE=DATE:20110725
1066SUMMARY:event-3a
1067END:VEVENT
1068BEGIN:VEVENT
1069DTSTART;VALUE=DATE:20110725
1070SUMMARY:event-3b
1071END:VEVENT
1072END:VCALENDAR
1073"
1074 "&2011/7/23 event-1\n&2011/7/24 event-2\n&2011/7/25 event-3a\n&2011/7/25 event-3b\n"
1075 "&23/7/2011 event-1\n&24/7/2011 event-2\n&25/7/2011 event-3a\n&25/7/2011 event-3b\n"
1076 "&7/23/2011 event-1\n&7/24/2011 event-2\n&7/25/2011 event-3a\n&7/25/2011 event-3b\n"))
1066 1077
1067;; ====================================================================== 1078;; ======================================================================
1068;; Cycle 1079;; Cycle
@@ -1113,7 +1124,7 @@ Argument INPUT icalendar event string."
1113 (when (re-search-forward "\nUID:.*\n" nil t) 1124 (when (re-search-forward "\nUID:.*\n" nil t)
1114 (replace-match "\n")) 1125 (replace-match "\n"))
1115 (let ((cycled (buffer-substring-no-properties (point-min) (point-max)))) 1126 (let ((cycled (buffer-substring-no-properties (point-min) (point-max))))
1116 (should (icalendar-tests--compare-strings cycled org-input))))) 1127 (should (string= org-input cycled)))))
1117 ;; clean up 1128 ;; clean up
1118 (kill-buffer (find-buffer-visiting temp-diary)) 1129 (kill-buffer (find-buffer-visiting temp-diary))
1119 (save-excursion 1130 (save-excursion
@@ -1211,12 +1222,14 @@ END:VCALENDAR"
1211 Desc: 10:30am - Blah 1222 Desc: 10:30am - Blah
1212 Location: Cccc 1223 Location: Cccc
1213 Organizer: MAILTO:aaaaaaa@aaaaaaa.com 1224 Organizer: MAILTO:aaaaaaa@aaaaaaa.com
1214 Status: CONFIRMED" 1225 Status: CONFIRMED
1226"
1215 "&5/9/2003 10:30-15:30 On-Site Interview 1227 "&5/9/2003 10:30-15:30 On-Site Interview
1216 Desc: 10:30am - Blah 1228 Desc: 10:30am - Blah
1217 Location: Cccc 1229 Location: Cccc
1218 Organizer: MAILTO:aaaaaaa@aaaaaaa.com 1230 Organizer: MAILTO:aaaaaaa@aaaaaaa.com
1219 Status: CONFIRMED") 1231 Status: CONFIRMED
1232")
1220 1233
1221 ;; 2003-06-18 a 1234 ;; 2003-06-18 a
1222 (icalendar-tests--test-import 1235 (icalendar-tests--test-import
@@ -1255,12 +1268,14 @@ END:VALARM"
1255 Desc: 753 Zeichen hier radiert 1268 Desc: 753 Zeichen hier radiert
1256 Location: 555 or TN 555-5555 ID 5555 & NochWas (see below) 1269 Location: 555 or TN 555-5555 ID 5555 & NochWas (see below)
1257 Organizer: MAILTO:xxx@xxxxx.com 1270 Organizer: MAILTO:xxx@xxxxx.com
1258 Status: CONFIRMED" 1271 Status: CONFIRMED
1272"
1259 "&6/23/2003 11:00-12:00 Dress Rehearsal for XXXX-XXXX 1273 "&6/23/2003 11:00-12:00 Dress Rehearsal for XXXX-XXXX
1260 Desc: 753 Zeichen hier radiert 1274 Desc: 753 Zeichen hier radiert
1261 Location: 555 or TN 555-5555 ID 5555 & NochWas (see below) 1275 Location: 555 or TN 555-5555 ID 5555 & NochWas (see below)
1262 Organizer: MAILTO:xxx@xxxxx.com 1276 Organizer: MAILTO:xxx@xxxxx.com
1263 Status: CONFIRMED") 1277 Status: CONFIRMED
1278")
1264 ;; 2003-06-18 b -- uses timezone 1279 ;; 2003-06-18 b -- uses timezone
1265 (icalendar-tests--test-import 1280 (icalendar-tests--test-import
1266 "BEGIN:VCALENDAR 1281 "BEGIN:VCALENDAR
@@ -1323,12 +1338,14 @@ END:VCALENDAR"
1323 Desc: Viele Zeichen standen hier früher 1338 Desc: Viele Zeichen standen hier früher
1324 Location: 123 or TN 123-1234 ID abcd & SonstWo (see below) 1339 Location: 123 or TN 123-1234 ID abcd & SonstWo (see below)
1325 Organizer: MAILTO:bbb@bbbbb.com 1340 Organizer: MAILTO:bbb@bbbbb.com
1326 Status: CONFIRMED" 1341 Status: CONFIRMED
1342"
1327 "&6/23/2003 17:00-18:00 Updated: Dress Rehearsal for ABC01-15 1343 "&6/23/2003 17:00-18:00 Updated: Dress Rehearsal for ABC01-15
1328 Desc: Viele Zeichen standen hier früher 1344 Desc: Viele Zeichen standen hier früher
1329 Location: 123 or TN 123-1234 ID abcd & SonstWo (see below) 1345 Location: 123 or TN 123-1234 ID abcd & SonstWo (see below)
1330 Organizer: MAILTO:bbb@bbbbb.com 1346 Organizer: MAILTO:bbb@bbbbb.com
1331 Status: CONFIRMED") 1347 Status: CONFIRMED
1348")
1332 ;; export 2004-10-28 block entries 1349 ;; export 2004-10-28 block entries
1333 (icalendar-tests--test-export 1350 (icalendar-tests--test-export
1334 nil 1351 nil
@@ -1697,7 +1714,8 @@ END:VCALENDAR
1697 Class: PRIVATE 1714 Class: PRIVATE
1698&%%(and (diary-cyclic 7 1 11 2004)) Wwww aa hhhh 1715&%%(and (diary-cyclic 7 1 11 2004)) Wwww aa hhhh
1699 Status: TENTATIVE 1716 Status: TENTATIVE
1700 Class: PRIVATE" 1717 Class: PRIVATE
1718"
1701 "&11/23/2004 14:00-14:30 Jjjjj & Wwwww 1719 "&11/23/2004 14:00-14:30 Jjjjj & Wwwww
1702 Status: TENTATIVE 1720 Status: TENTATIVE
1703 Class: PRIVATE 1721 Class: PRIVATE
@@ -1716,7 +1734,8 @@ END:VCALENDAR
1716 Class: PRIVATE 1734 Class: PRIVATE
1717&%%(and (diary-cyclic 7 11 1 2004)) Wwww aa hhhh 1735&%%(and (diary-cyclic 7 11 1 2004)) Wwww aa hhhh
1718 Status: TENTATIVE 1736 Status: TENTATIVE
1719 Class: PRIVATE") 1737 Class: PRIVATE
1738")
1720 1739
1721 ;; 2004-09-09 pg 1740 ;; 2004-09-09 pg
1722 (icalendar-tests--test-export 1741 (icalendar-tests--test-export
@@ -1771,11 +1790,13 @@ DTSTAMP
1771 "&%%(and (diary-block 6 2 2005 6 2 2005)) Waitangi Day 1790 "&%%(and (diary-block 6 2 2005 6 2 2005)) Waitangi Day
1772 Desc: abcdef 1791 Desc: abcdef
1773 Status: CONFIRMED 1792 Status: CONFIRMED
1774 Class: PRIVATE" 1793 Class: PRIVATE
1794"
1775 "&%%(and (diary-block 2 6 2005 2 6 2005)) Waitangi Day 1795 "&%%(and (diary-block 2 6 2005 2 6 2005)) Waitangi Day
1776 Desc: abcdef 1796 Desc: abcdef
1777 Status: CONFIRMED 1797 Status: CONFIRMED
1778 Class: PRIVATE") 1798 Class: PRIVATE
1799")
1779 1800
1780 ;; 2005-03-01 lt 1801 ;; 2005-03-01 lt
1781 (icalendar-tests--test-import 1802 (icalendar-tests--test-import
@@ -1785,8 +1806,8 @@ UID:6AFA7558-6994-11D9-8A3A-000A95A0E830-RID
1785DTSTAMP:20050118T210335Z 1806DTSTAMP:20050118T210335Z
1786DURATION:P7D" 1807DURATION:P7D"
1787 nil 1808 nil
1788 "&%%(and (diary-block 17 2 2005 23 2 2005)) Hhhhhh Aaaaa ii Aaaaaaaa" 1809 "&%%(and (diary-block 17 2 2005 23 2 2005)) Hhhhhh Aaaaa ii Aaaaaaaa\n"
1789 "&%%(and (diary-block 2 17 2005 2 23 2005)) Hhhhhh Aaaaa ii Aaaaaaaa") 1810 "&%%(and (diary-block 2 17 2005 2 23 2005)) Hhhhhh Aaaaa ii Aaaaaaaa\n")
1790 1811
1791 ;; 2005-03-23 lt 1812 ;; 2005-03-23 lt
1792 (icalendar-tests--test-export 1813 (icalendar-tests--test-export