feat: support safe recurrence additions
Parse, persist, expand, and round-trip compatible RDATE values while preserving whole-series TUI behavior and conservative rewrite guards. Verified: normal, warning-as-error, and ASan/UBSan builds pass all 9 suites; storage failure paths preserve calendar and backup bytes; live PTY restores terminal state.
This commit is contained in:
@@ -65,6 +65,7 @@ void check_invalid_argument(Function&& function, const std::string_view message)
|
||||
recurrence.by_month_day = {1, -1};
|
||||
recurrence.by_month = {1, 7};
|
||||
event.recurrence = std::move(recurrence);
|
||||
event.recurrence_additions = {at(20)};
|
||||
event.recurrence_exceptions = {at(16), at(18)};
|
||||
return event;
|
||||
}
|
||||
@@ -79,6 +80,7 @@ void check_invalid_argument(Function&& function, const std::string_view message)
|
||||
left.time_basis == right.time_basis &&
|
||||
left.time_zone == right.time_zone &&
|
||||
left.recurrence == right.recurrence &&
|
||||
left.recurrence_additions == right.recurrence_additions &&
|
||||
left.recurrence_exceptions == right.recurrence_exceptions;
|
||||
}
|
||||
|
||||
@@ -163,6 +165,8 @@ void test_every_event_field_participates_in_collision_equality()
|
||||
{"time basis", [](auto& event) { event.time_basis = nocal::TimeBasis::utc; }},
|
||||
{"time zone", [](auto& event) { event.time_zone = "America/New_York"; }},
|
||||
{"recurrence", [](auto& event) { event.recurrence->interval += 1; }},
|
||||
{"recurrence additions",
|
||||
[](auto& event) { event.recurrence_additions.push_back(at(19)); }},
|
||||
{"recurrence exclusions",
|
||||
[](auto& event) { event.recurrence_exceptions.push_back(at(19)); }},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user