aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Jasper2014-11-17 16:53:09 +0100
committerUlf Jasper2014-11-17 16:58:26 +0100
commit62243cb96f133581157f6eafa934b5b7ca4cc065 (patch)
tree5c143a09d6f1aac8ffbda0cbd2325a6659690ddf
parent8b98d158a75b94b80d17b3af3419b3163c64945c (diff)
downloademacs-62243cb96f133581157f6eafa934b5b7ca4cc065.tar.gz
emacs-62243cb96f133581157f6eafa934b5b7ca4cc065.zip
icalendar: Add another test case for no-dst timezones.
-rw-r--r--test/ChangeLog7
-rw-r--r--test/automated/icalendar-tests.el46
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 @@
12014-11-17 Ulf Jasper <ulf.jasper@web.de>
2
3 * automated/icalendar-tests.el (icalendar-tests--test-import):
4 Mention timezone in doc string. Clean up.
5 (icalendar-real-world): Add another test case for no-dst
6 timezones.
7
12014-11-16 Ulf Jasper <ulf.jasper@web.de> 82014-11-16 Ulf Jasper <ulf.jasper@web.de>
2 9
3 * automated/icalendar-tests.el (icalendar--parse-vtimezone): Add 10 * 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
763Argument INPUT icalendar event string. 763Argument INPUT icalendar event string.
764Argument EXPECTED-ISO expected iso style diary string. 764Argument EXPECTED-ISO expected iso style diary string.
765Argument EXPECTED-EUROPEAN expected european style diary string. 765Argument EXPECTED-EUROPEAN expected european style diary string.
766Argument EXPECTED-AMERICAN expected american style diary string." 766Argument EXPECTED-AMERICAN expected american style diary string.
767During import test the timezone is set to Central European Time."
767 (let ((timezone (getenv "TZ"))) 768 (let ((timezone (getenv "TZ")))
768 (unwind-protect 769 (unwind-protect
769 (progn 770 (progn
770;;; (message "Current time zone: %s" (current-time-zone))
771 ;; Use this form so as not to rely on system tz database. 771 ;; Use this form so as not to rely on system tz database.
772 ;; Eg hydra.nixos.org. 772 ;; Eg hydra.nixos.org.
773 (setenv "TZ" "CET-1CEST,M3.5.0/2,M10.5.0/3") 773 (setenv "TZ" "CET-1CEST,M3.5.0/2,M10.5.0/3")
774;;; (message "Current time zone: %s" (current-time-zone))
775 (with-temp-buffer 774 (with-temp-buffer
776 (if (string-match "^BEGIN:VCALENDAR" input) 775 (if (string-match "^BEGIN:VCALENDAR" input)
777 (insert input) 776 (insert input)
@@ -1425,6 +1424,47 @@ END:VCALENDAR"
1425 UID: 040000008200E00074C5B7101A82E0080000000080B6DE661216C301000000000000000010000000DB823520692542408ED02D7023F9DFF9 1424 UID: 040000008200E00074C5B7101A82E0080000000080B6DE661216C301000000000000000010000000DB823520692542408ED02D7023F9DFF9
1426") 1425")
1427 1426
1427 ;; created with http://apps.marudot.com/ical/
1428 (icalendar-tests--test-import
1429 "BEGIN:VCALENDAR
1430VERSION:2.0
1431PRODID:-//www.marudot.com//iCal Event Maker
1432X-WR-CALNAME:Test
1433CALSCALE:GREGORIAN
1434BEGIN:VTIMEZONE
1435TZID:Asia/Tehran
1436TZURL:http://tzurl.org/zoneinfo-outlook/Asia/Tehran
1437X-LIC-LOCATION:Asia/Tehran
1438BEGIN:STANDARD
1439TZOFFSETFROM:+0330
1440TZOFFSETTO:+0330
1441TZNAME:IRST
1442DTSTART:19700101T000000
1443END:STANDARD
1444END:VTIMEZONE
1445BEGIN:VEVENT
1446DTSTAMP:20141116T171439Z
1447UID:20141116T171439Z-678877132@marudot.com
1448DTSTART;TZID=\"Asia/Tehran\":20141116T070000
1449DTEND;TZID=\"Asia/Tehran\":20141116T080000
1450SUMMARY:NoDST
1451DESCRIPTION:Test event from timezone without DST
1452LOCATION:Everywhere
1453END:VEVENT
1454END:VCALENDAR"
1455 nil
1456 "&16/11/2014 04:30-05:30 NoDST
1457 Desc: Test event from timezone without DST
1458 Location: Everywhere
1459 UID: 20141116T171439Z-678877132@marudot.com
1460"
1461 "&11/16/2014 04:30-05:30 NoDST
1462 Desc: Test event from timezone without DST
1463 Location: Everywhere
1464 UID: 20141116T171439Z-678877132@marudot.com
1465")
1466
1467
1428 ;; 2003-06-18 a 1468 ;; 2003-06-18 a
1429 (icalendar-tests--test-import 1469 (icalendar-tests--test-import
1430 "DTSTAMP:20030618T195512Z 1470 "DTSTAMP:20030618T195512Z