aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-13 12:12:35 -0500
committerCraig Jennings <c@cjennings.net>2026-07-13 12:12:35 -0500
commita9e61207f6c806271cbc69fe27fde04b22e34e0a (patch)
treeacdfc94f218cdfb47da2498309e3fa4469578fe6 /tests
parent904e8885eeb66a48cce281aff23d0f6c754f3c10 (diff)
downloaddotemacs-a9e61207f6c806271cbc69fe27fde04b22e34e0a.tar.gz
dotemacs-a9e61207f6c806271cbc69fe27fde04b22e34e0a.zip
bug: fixing exdate lines and adding tests
Diffstat (limited to 'tests')
-rw-r--r--tests/test-calendar-sync--get-exdates.el29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/test-calendar-sync--get-exdates.el b/tests/test-calendar-sync--get-exdates.el
index 3283bbae..981a1857 100644
--- a/tests/test-calendar-sync--get-exdates.el
+++ b/tests/test-calendar-sync--get-exdates.el
@@ -103,6 +103,35 @@ END:VEVENT"))
(should (= 1 (length result)))
(should (string= "20260210T130000" (car result))))))
+(ert-deftest test-calendar-sync--get-exdates-boundary-comma-separated-returns-all ()
+ "Boundary: comma-separated EXDATE values on one line are each returned.
+RFC 5545 permits multiple datetimes per EXDATE line; missing the split
+drops those exclusions, so cancelled instances resurrect in the agenda."
+ (let ((event "BEGIN:VEVENT
+DTSTART:20260203T130000
+RRULE:FREQ=WEEKLY;BYDAY=TU
+EXDATE:20260210T130000,20260217T130000,20260224T130000
+SUMMARY:Weekly Meeting
+END:VEVENT"))
+ (let ((result (calendar-sync--get-exdates event)))
+ (should (= 3 (length result)))
+ (should (member "20260210T130000" result))
+ (should (member "20260217T130000" result))
+ (should (member "20260224T130000" result)))))
+
+(ert-deftest test-calendar-sync--get-exdates-boundary-comma-separated-with-tzid ()
+ "Boundary: comma-separated EXDATE values sharing a TZID are each returned."
+ (let ((event "BEGIN:VEVENT
+DTSTART;TZID=America/New_York:20260203T130000
+RRULE:FREQ=WEEKLY;BYDAY=TU
+EXDATE;TZID=America/New_York:20260210T130000,20260217T130000
+SUMMARY:Weekly Meeting
+END:VEVENT"))
+ (let ((result (calendar-sync--get-exdates event)))
+ (should (= 2 (length result)))
+ (should (member "20260210T130000" result))
+ (should (member "20260217T130000" result)))))
+
;;; Error Cases
(ert-deftest test-calendar-sync--get-exdates-error-empty-string-returns-nil ()