@@ -254,7 +254,9 @@ class PrepareCalendar(Check):
254254 depends_on = {CheckMakeDeleteCalendar }
255255 features_to_be_checked = {
256256 "save-load.event.recurrences" ,
257+ "save-load.event.recurrences.count" ,
257258 "save-load.todo.recurrences" ,
259+ "save-load.todo.recurrences.count" ,
258260 "save-load.event" ,
259261 "save-load.todo" ,
260262 "save-load.todo.mixed-calendar" ,
@@ -410,6 +412,24 @@ def add_if_not_existing(*largs, **kwargs):
410412 recurring_event .load ()
411413 self .set_feature ("save-load.event.recurrences" )
412414
415+ event_with_rrule_and_count = add_if_not_existing (Event , """BEGIN:VCALENDAR
416+ VERSION:2.0
417+ PRODID:-//Example Corp.//CalDAV Client//EN
418+ BEGIN:VEVENT
419+ UID:weeklymeeting
420+ DTSTAMP:20001013T151313Z
421+ DTSTART:20001018T140000Z
422+ DTEND:20001018T150000Z
423+ SUMMARY:Weekly meeting for three weeks
424+ RRULE:FREQ=WEEKLY;COUNT=3
425+ END:VEVENT
426+ END:VCALENDAR""" )
427+ event_with_rrule_and_count .load ()
428+ component = event_with_rrule_and_count .component
429+ rrule = component .get ('RRULE' , None )
430+ count = rrule and rrule .get ('COUNT' )
431+ self .set_feature ("save-load.event.recurrences.count" , count == [3 ])
432+
413433 recurring_task = add_if_not_existing (
414434 Todo ,
415435 summary = "monthly recurring task" ,
@@ -421,6 +441,27 @@ def add_if_not_existing(*largs, **kwargs):
421441 recurring_task .load ()
422442 self .set_feature ("save-load.todo.recurrences" )
423443
444+ task_with_rrule_and_count = add_if_not_existing (Todo , """BEGIN:VCALENDAR
445+ VERSION:2.0
446+ PRODID:-//Example Corp.//CalDAV Client//EN
447+ BEGIN:VTODO
448+ UID:takeoutthethrash
449+ DTSTAMP:20001013T151313Z
450+ DTSTART:20001016T065500Z
451+ STATUS:NEEDS-ACTION
452+ DURATION:PT10M
453+ SUMMARY:Weekly task to be done three times
454+ RRULE:FREQ=WEEKLY;BYDAY=MO;COUNT=3
455+ CATEGORIES:CHORE
456+ PRIORITY:3
457+ END:VTODO
458+ END:VCALENDAR""" )
459+ task_with_rrule_and_count .load ()
460+ component = task_with_rrule_and_count .component
461+ rrule = component .get ('RRULE' , None )
462+ count = rrule and rrule .get ('COUNT' )
463+ self .set_feature ("save-load.todo.recurrences.count" , count == [3 ])
464+
424465 recurring_event_with_exception = add_if_not_existing (
425466 Event ,
426467 """BEGIN:VCALENDAR
0 commit comments