Verify exact mod membership names after case-only renames (by Codex)

This commit is contained in:
Codex committed 2026-10-26 09:03:33 +01:00
1 parent 6bcd95d668
commit a0bb8b47dc
2 files changed
+14

No files matched your search

+5
View File
@@ -261,7 +261,12 @@ void lifecycle() {
selected = library.snapshot();
const auto renamed = library.rename(first, "ÖFFNUNG", selected.selection_token);
require(renamed.valid() && library.snapshot().active == renamed.id && fs::exists(renamed.path / "content.obw"), "Case-only rename lost active selection");
const auto before_case_alias = tree(portable);
rejected([&] { library.activate(first, library.snapshot().selection_token); }, "Obsolete casing alias activated a renamed member");
rejected([&] { library.rename(first, "Alias rename", library.snapshot().selection_token); }, "Obsolete casing alias renamed a current member");
rejected([&] { library.remove(first, library.snapshot().selection_token); }, "Old membership token survived rename");
require(tree(portable) == before_case_alias && library.snapshot().active == renamed.id,
"Rejected old casing aliases changed files or persisted active identity");
const auto foreign = UiModLibrary(fixture.root / "other").commit(library.inspect(source), "Foreign");
const auto stable = tree(portable);
rejected([&] { library.remove(foreign, library.snapshot().selection_token); }, "Foreign library membership accepted");