diff options
| author | Ulf Jasper | 2014-11-16 17:23:45 +0100 |
|---|---|---|
| committer | Ulf Jasper | 2014-11-16 17:23:45 +0100 |
| commit | 7261b4d9b2f35c3e520b488a8ba3cfde30f84a24 (patch) | |
| tree | b50d3087acf6dca06ce807bcfa79d9ab7d5961bc /test | |
| parent | a97fd0eb8d043170601808e6e5a349e6981c30c4 (diff) | |
| download | emacs-7261b4d9b2f35c3e520b488a8ba3cfde30f84a24.tar.gz emacs-7261b4d9b2f35c3e520b488a8ba3cfde30f84a24.zip | |
icalendar: fix issues regarding timezones without dst
* lisp/calendar/icalendar.el (icalendar--convert-tz-offset): Return
complete cons when offsets of standard time and daylight saving
time are equal.
(icalendar-export-region): Fix unbound variable warning.
* test/automated/icalendar-tests.el (icalendar--parse-vtimezone): Add
testcase where offsets of standard time and daylight saving time
are equal.
(icalendar-real-world): Fix error in test case. Expected result
was wrong when offsets of standard time and daylight saving time
were equal.
Diffstat (limited to 'test')
| -rw-r--r-- | test/ChangeLog | 9 | ||||
| -rw-r--r-- | test/automated/icalendar-tests.el | 25 |
2 files changed, 32 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index e0e04bc262c..4a6f0059344 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2014-11-16 Ulf Jasper <ulf.jasper@web.de> | ||
| 2 | |||
| 3 | * automated/icalendar-tests.el (icalendar--parse-vtimezone): Add | ||
| 4 | testcase where offsets of standard time and daylight saving time | ||
| 5 | are equal. | ||
| 6 | (icalendar-real-world): Fix error in test case. Expected result | ||
| 7 | was wrong when offsets of standard time and daylight saving time | ||
| 8 | were equal. | ||
| 9 | |||
| 1 | 2014-11-16 Fabián Ezequiel Gallina <fgallina@gnu.org> | 10 | 2014-11-16 Fabián Ezequiel Gallina <fgallina@gnu.org> |
| 2 | 11 | ||
| 3 | * automated/python-tests.el | 12 | * automated/python-tests.el |
diff --git a/test/automated/icalendar-tests.el b/test/automated/icalendar-tests.el index a6a5da2ff57..23afb14792d 100644 --- a/test/automated/icalendar-tests.el +++ b/test/automated/icalendar-tests.el | |||
| @@ -232,6 +232,27 @@ END:VTIMEZONE | |||
| 232 | (should (string= "anothername, with a comma" (car result))) | 232 | (should (string= "anothername, with a comma" (car result))) |
| 233 | (message (cdr result)) | 233 | (message (cdr result)) |
| 234 | (should (string= "STD-02:00DST-03:00,M3.2.1/03:00:00,M10.2.1/04:00:00" | 234 | (should (string= "STD-02:00DST-03:00,M3.2.1/03:00:00,M10.2.1/04:00:00" |
| 235 | (cdr result))) | ||
| 236 | ;; offsetfrom = offsetto | ||
| 237 | (setq vtimezone (icalendar-tests--get-ical-event "BEGIN:VTIMEZONE | ||
| 238 | TZID:Kolkata\, Chennai\, Mumbai\, New Delhi | ||
| 239 | X-MICROSOFT-CDO-TZID:23 | ||
| 240 | BEGIN:STANDARD | ||
| 241 | DTSTART:16010101T000000 | ||
| 242 | TZOFFSETFROM:+0530 | ||
| 243 | TZOFFSETTO:+0530 | ||
| 244 | END:STANDARD | ||
| 245 | BEGIN:DAYLIGHT | ||
| 246 | DTSTART:16010101T000000 | ||
| 247 | TZOFFSETFROM:+0530 | ||
| 248 | TZOFFSETTO:+0530 | ||
| 249 | END:DAYLIGHT | ||
| 250 | END:VTIMEZONE | ||
| 251 | ")) | ||
| 252 | (setq result (icalendar--parse-vtimezone vtimezone)) | ||
| 253 | (should (string= "Kolkata, Chennai, Mumbai, New Delhi" (car result))) | ||
| 254 | (message (cdr result)) | ||
| 255 | (should (string= "STD-05:30DST-05:30,M1.1.1/00:00:00,M1.1.1/00:00:00" | ||
| 235 | (cdr result))))) | 256 | (cdr result))))) |
| 236 | 257 | ||
| 237 | (ert-deftest icalendar--convert-ordinary-to-ical () | 258 | (ert-deftest icalendar--convert-ordinary-to-ical () |
| @@ -1389,14 +1410,14 @@ END:VALARM | |||
| 1389 | END:VEVENT | 1410 | END:VEVENT |
| 1390 | END:VCALENDAR" | 1411 | END:VCALENDAR" |
| 1391 | nil | 1412 | nil |
| 1392 | "&9/5/2003 10:30-15:30 On-Site Interview | 1413 | "&9/5/2003 07:00-12:00 On-Site Interview |
| 1393 | Desc: 10:30am - Blah | 1414 | Desc: 10:30am - Blah |
| 1394 | Location: Cccc | 1415 | Location: Cccc |
| 1395 | Organizer: MAILTO:aaaaaaa@aaaaaaa.com | 1416 | Organizer: MAILTO:aaaaaaa@aaaaaaa.com |
| 1396 | Status: CONFIRMED | 1417 | Status: CONFIRMED |
| 1397 | UID: 040000008200E00074C5B7101A82E0080000000080B6DE661216C301000000000000000010000000DB823520692542408ED02D7023F9DFF9 | 1418 | UID: 040000008200E00074C5B7101A82E0080000000080B6DE661216C301000000000000000010000000DB823520692542408ED02D7023F9DFF9 |
| 1398 | " | 1419 | " |
| 1399 | "&5/9/2003 10:30-15:30 On-Site Interview | 1420 | "&5/9/2003 07:00-12:00 On-Site Interview |
| 1400 | Desc: 10:30am - Blah | 1421 | Desc: 10:30am - Blah |
| 1401 | Location: Cccc | 1422 | Location: Cccc |
| 1402 | Organizer: MAILTO:aaaaaaa@aaaaaaa.com | 1423 | Organizer: MAILTO:aaaaaaa@aaaaaaa.com |