events: iCal coverage for southern-hemisphere VTIMEZONE (+7) — 391/391
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 25s

The previous commit asserted southern zones round-trip through iCal unchanged
but verified it only by reasoning. Close that gap with explicit tests:

- A Sydney VTIMEZONE export block: TZID:Australia/Sydney, DAYLIGHT->+1100
  (AEDT) / STANDARD->+1000 (AEST), first-Sunday rules (BYMONTH=10/4 BYDAY=1SU),
  and DAYLIGHT DTSTART:19701004T020000 — confirming the -480 rule time folds
  the from-offset back to the correct local 02:00 AEST transition.
- A southern-zone DTSTART;TZID export -> import round-trip preserving :dtstart.

+7 ical tests (now 63).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-10 22:04:04 +00:00
parent 78b45a331e
commit 6716af69dc
2 changed files with 26 additions and 2 deletions

View File

@@ -335,6 +335,17 @@
(do
(ev-ic-check! "Paris DAYLIGHT goes to +0200 (CEST)" (ev-ic-find vtz "TZOFFSETTO:+0200") "TZOFFSETTO:+0200")
(ev-ic-check! "Paris STANDARD goes to +0100 (CET)" (ev-ic-find vtz "TZOFFSETTO:+0100") "TZOFFSETTO:+0100")))
;; southern hemisphere exports a valid VTIMEZONE too: reversed offsets,
;; first-Sunday rules, and the -480 rule time folds back to local 02:00/03:00
(let
((vtz (ev-ical-vtimezone ev-tz-sydney)))
(do
(ev-ic-check! "Sydney VTIMEZONE names the zone" (ev-ic-find vtz "TZID") "TZID:Australia/Sydney")
(ev-ic-check! "Sydney DAYLIGHT goes to +1100 (AEDT)" (ev-ic-find vtz "TZOFFSETTO:+1100") "TZOFFSETTO:+1100")
(ev-ic-check! "Sydney STANDARD goes to +1000 (AEST)" (ev-ic-find vtz "TZOFFSETTO:+1000") "TZOFFSETTO:+1000")
(ev-ic-check! "Sydney DAYLIGHT rule is first Sunday of October" (ev-ic-find vtz "RRULE:FREQ=YEARLY;BYMONTH=10") "RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=1SU")
(ev-ic-check! "Sydney STANDARD rule is first Sunday of April" (ev-ic-find vtz "RRULE:FREQ=YEARLY;BYMONTH=4") "RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU")
(ev-ic-check! "Sydney DAYLIGHT begins 02:00 local (AEST std, -480 folded)" (ev-ic-find vtz "DTSTART") "DTSTART:19701004T020000")))
;; ---- VCALENDAR carries one VTIMEZONE per distinct zone ----
(let
@@ -371,7 +382,13 @@
(get
(ev/ical-lines->event (ev/event->ical-lines (ev-event-tz (quote a) (ev-dt 2026 7 15 18 0) 60 nil 1 ev-tz-london)))
:dtstart)
(ev-dt 2026 7 15 18 0)))))
(ev-dt 2026 7 15 18 0))
(ev-ic-check!
"import parses a southern-zone DTSTART;TZID local time"
(get
(ev/ical-lines->event (ev/event->ical-lines (ev-event-tz (quote a) (ev-dt 2026 1 15 18 0) 60 nil 1 ev-tz-sydney)))
:dtstart)
(ev-dt 2026 1 15 18 0)))))
(define
ev-ical-tests-run!