Reschedule undo clears the calendar replay bit (#16)
UndoReschedule of the original clears bit 0x4000 of the calendar day (high byte & 0xbf) when no replay of another club stays on it; both cores kept the bit, so the day and its neighbour were no longer offered as targets after a move was taken back. Tests check the same target days after the undo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9fc05d18ee
commit
cbde7b367e
6 files changed
+34
-6
No files matched your search
@@ -440,6 +440,15 @@ int main(int argc, char** argv) {
|
||||
check(moved_seen, "calendar: the moved match on its new date");
|
||||
const J undone = session.ui_command(cmd("request:f2", "fixture.reschedule", O{{"action", "undo"}, {"date", target}}), rev);
|
||||
check(s(at(undone, "messageType")) == "command_result", "move taken back");
|
||||
// issue 16: after the undo the match offers the same target dates as before the move
|
||||
const auto targets_of = [&](const J& read) {
|
||||
if (const auto* list = at(at(read, "data"), "movable").array())
|
||||
for (const auto& mv : *list)
|
||||
if (s(at(mv, "id")) == match) return cli::dump_json(at(mv, "targetDates"));
|
||||
return std::string{};
|
||||
};
|
||||
check(!targets_of(sched).empty() && targets_of(session.ui_read(O{{"kind", "scheduling"}}, rev)) == targets_of(sched),
|
||||
"the same target dates after the undo");
|
||||
std::printf("(moved %s to %s and back)\n", match.c_str(), target.c_str());
|
||||
}
|
||||
const J friendly = session.ui_read(O{{"kind", "friendly"}, {"opponentId", "team:70"}, {"home", true}}, rev);
|
||||
|
||||
Reference in new issue
Block a user