X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/2573a8376a387d19af355f68622512ac3e07d57a..e6fd457e010c2ec034a331335530d817852cc11c:/test/automated/icalendar-tests.el diff --git a/test/automated/icalendar-tests.el b/test/automated/icalendar-tests.el index 04fce7383f..503ea22d2b 100644 --- a/test/automated/icalendar-tests.el +++ b/test/automated/icalendar-tests.el @@ -1,6 +1,6 @@ ;; icalendar-tests.el --- Test suite for icalendar.el -;; Copyright (C) 2005, 2008-2011 Free Software Foundation, Inc. +;; Copyright (C) 2005, 2008-2012 Free Software Foundation, Inc. ;; Author: Ulf Jasper ;; Created: March 2005 @@ -39,7 +39,7 @@ ;; ====================================================================== (defun icalendar-tests--get-ical-event (ical-string) - "Return icalendar event for ICAL-STRING." + "Return iCalendar event for ICAL-STRING." (save-excursion (with-temp-buffer (insert ical-string) @@ -219,7 +219,7 @@ END:VTIMEZONE (should (string= "\nDTSTART;VALUE=DATE:20100215\nDTEND;VALUE=DATE:20100216" (car result))) (should (string= "subject" (cadr result))) - + ;; with time (setq result (icalendar--convert-ordinary-to-ical "&?" "&2010 2 15 12:34-23:45 s")) @@ -424,7 +424,7 @@ END:VEVENT Argument INPUT-ISO iso style diary string. Argument INPUT-EUROPEAN european style diary string. Argument INPUT-AMERICAN american style diary string. -Argument EXPECTED-OUTPUT expected icalendar result string. +Argument EXPECTED-OUTPUT expected iCalendar result string. European style input data must use german month names. American and ISO style input data must use english month names." @@ -467,7 +467,7 @@ and ISO style input data must use english month names." (defun icalendar-tests--do-test-export (input expected-output) "Actually perform export test. Argument INPUT input diary string. -Argument EXPECTED-OUTPUT expected icalendar result string." +Argument EXPECTED-OUTPUT expected iCalendar result string." (let ((temp-file (make-temp-file "icalendar-tests-ics"))) (unwind-protect (progn @@ -731,10 +731,9 @@ DTSTART;VALUE=DATE-TIME:20030919" "&19/9/2003 non-recurring allday\n" "&9/19/2003 non-recurring allday\n") (icalendar-tests--test-import - ;; do not remove the trailing blank after "long"! - "SUMMARY:long - summary -DTSTART;VALUE=DATE:20030919" + ;; Checkdoc removes trailing blanks. Therefore: format! + (format "%s\n%s\n%s" "SUMMARY:long " " summary" + "DTSTART;VALUE=DATE:20030919") "&2003/9/19 long summary\n" "&19/9/2003 long summary\n" "&9/19/2003 long summary\n") @@ -1041,7 +1040,7 @@ SUMMARY:event-1 "&2011/7/23 event-1\n" "&23/7/2011 event-1\n" "&7/23/2011 event-1\n") - + (icalendar-tests--test-import "BEGIN:VCALENDAR PRODID:-//Emacs//NONSGML icalendar.el//EN @@ -1111,7 +1110,7 @@ Argument INPUT icalendar event string." (progn ;; step 1: import (icalendar-import-buffer temp-diary t t) - + ;; step 2: export what was just imported (save-excursion (find-file temp-diary) @@ -1399,7 +1398,7 @@ SUMMARY:may 30 - June 1: ee") "DTSTART;VALUE=DATE:20050606 DTEND;VALUE=DATE:20050609 SUMMARY:ff") - + ;; export 2004-10-28 anniversary entries (icalendar-tests--test-export nil