From 62243cb96f133581157f6eafa934b5b7ca4cc065 Mon Sep 17 00:00:00 2001 From: Ulf Jasper Date: Mon, 17 Nov 2014 16:53:09 +0100 Subject: [PATCH] icalendar: Add another test case for no-dst timezones. --- test/ChangeLog | 7 +++++ test/automated/icalendar-tests.el | 46 +++++++++++++++++++++++++++++-- 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/test/ChangeLog b/test/ChangeLog index 4a6f0059344..47bbfb36a10 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,10 @@ +2014-11-17 Ulf Jasper + + * automated/icalendar-tests.el (icalendar-tests--test-import): + Mention timezone in doc string. Clean up. + (icalendar-real-world): Add another test case for no-dst + timezones. + 2014-11-16 Ulf Jasper * automated/icalendar-tests.el (icalendar--parse-vtimezone): Add diff --git a/test/automated/icalendar-tests.el b/test/automated/icalendar-tests.el index 23afb14792d..b45806e9777 100644 --- a/test/automated/icalendar-tests.el +++ b/test/automated/icalendar-tests.el @@ -763,15 +763,14 @@ SUMMARY:block no end time Argument INPUT icalendar event string. Argument EXPECTED-ISO expected iso style diary string. Argument EXPECTED-EUROPEAN expected european style diary string. -Argument EXPECTED-AMERICAN expected american style diary string." +Argument EXPECTED-AMERICAN expected american style diary string. +During import test the timezone is set to Central European Time." (let ((timezone (getenv "TZ"))) (unwind-protect (progn -;;; (message "Current time zone: %s" (current-time-zone)) ;; Use this form so as not to rely on system tz database. ;; Eg hydra.nixos.org. (setenv "TZ" "CET-1CEST,M3.5.0/2,M10.5.0/3") -;;; (message "Current time zone: %s" (current-time-zone)) (with-temp-buffer (if (string-match "^BEGIN:VCALENDAR" input) (insert input) @@ -1425,6 +1424,47 @@ END:VCALENDAR" UID: 040000008200E00074C5B7101A82E0080000000080B6DE661216C301000000000000000010000000DB823520692542408ED02D7023F9DFF9 ") + ;; created with http://apps.marudot.com/ical/ + (icalendar-tests--test-import + "BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//www.marudot.com//iCal Event Maker +X-WR-CALNAME:Test +CALSCALE:GREGORIAN +BEGIN:VTIMEZONE +TZID:Asia/Tehran +TZURL:http://tzurl.org/zoneinfo-outlook/Asia/Tehran +X-LIC-LOCATION:Asia/Tehran +BEGIN:STANDARD +TZOFFSETFROM:+0330 +TZOFFSETTO:+0330 +TZNAME:IRST +DTSTART:19700101T000000 +END:STANDARD +END:VTIMEZONE +BEGIN:VEVENT +DTSTAMP:20141116T171439Z +UID:20141116T171439Z-678877132@marudot.com +DTSTART;TZID=\"Asia/Tehran\":20141116T070000 +DTEND;TZID=\"Asia/Tehran\":20141116T080000 +SUMMARY:NoDST +DESCRIPTION:Test event from timezone without DST +LOCATION:Everywhere +END:VEVENT +END:VCALENDAR" + nil + "&16/11/2014 04:30-05:30 NoDST + Desc: Test event from timezone without DST + Location: Everywhere + UID: 20141116T171439Z-678877132@marudot.com +" + "&11/16/2014 04:30-05:30 NoDST + Desc: Test event from timezone without DST + Location: Everywhere + UID: 20141116T171439Z-678877132@marudot.com +") + + ;; 2003-06-18 a (icalendar-tests--test-import "DTSTAMP:20030618T195512Z -- 2.39.5