diff options
| author | Ulf Jasper | 2014-11-17 16:53:09 +0100 |
|---|---|---|
| committer | Ulf Jasper | 2014-11-17 16:58:26 +0100 |
| commit | 62243cb96f133581157f6eafa934b5b7ca4cc065 (patch) | |
| tree | 5c143a09d6f1aac8ffbda0cbd2325a6659690ddf | |
| parent | 8b98d158a75b94b80d17b3af3419b3163c64945c (diff) | |
| download | emacs-62243cb96f133581157f6eafa934b5b7ca4cc065.tar.gz emacs-62243cb96f133581157f6eafa934b5b7ca4cc065.zip | |
icalendar: Add another test case for no-dst timezones.
| -rw-r--r-- | test/ChangeLog | 7 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 2014-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 | |||
| 1 | 2014-11-16 Ulf Jasper <ulf.jasper@web.de> | 8 | 2014-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 | |||
| 763 | Argument INPUT icalendar event string. | 763 | Argument INPUT icalendar event string. |
| 764 | Argument EXPECTED-ISO expected iso style diary string. | 764 | Argument EXPECTED-ISO expected iso style diary string. |
| 765 | Argument EXPECTED-EUROPEAN expected european style diary string. | 765 | Argument EXPECTED-EUROPEAN expected european style diary string. |
| 766 | Argument EXPECTED-AMERICAN expected american style diary string." | 766 | Argument EXPECTED-AMERICAN expected american style diary string. |
| 767 | During 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 | ||
| 1430 | VERSION:2.0 | ||
| 1431 | PRODID:-//www.marudot.com//iCal Event Maker | ||
| 1432 | X-WR-CALNAME:Test | ||
| 1433 | CALSCALE:GREGORIAN | ||
| 1434 | BEGIN:VTIMEZONE | ||
| 1435 | TZID:Asia/Tehran | ||
| 1436 | TZURL:http://tzurl.org/zoneinfo-outlook/Asia/Tehran | ||
| 1437 | X-LIC-LOCATION:Asia/Tehran | ||
| 1438 | BEGIN:STANDARD | ||
| 1439 | TZOFFSETFROM:+0330 | ||
| 1440 | TZOFFSETTO:+0330 | ||
| 1441 | TZNAME:IRST | ||
| 1442 | DTSTART:19700101T000000 | ||
| 1443 | END:STANDARD | ||
| 1444 | END:VTIMEZONE | ||
| 1445 | BEGIN:VEVENT | ||
| 1446 | DTSTAMP:20141116T171439Z | ||
| 1447 | UID:20141116T171439Z-678877132@marudot.com | ||
| 1448 | DTSTART;TZID=\"Asia/Tehran\":20141116T070000 | ||
| 1449 | DTEND;TZID=\"Asia/Tehran\":20141116T080000 | ||
| 1450 | SUMMARY:NoDST | ||
| 1451 | DESCRIPTION:Test event from timezone without DST | ||
| 1452 | LOCATION:Everywhere | ||
| 1453 | END:VEVENT | ||
| 1454 | END: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 |