fix: group a system once whatever its spelling

The platform's files and the core extras for the Master System sat
in two region groups, sega-master-system and sega-mastersystem,
reduced apart. A US pack kept the declared Japanese BIOS. A core
extra's system group now takes the platform's spelling, in the pack,
the report and the installer's manifest fields alike.
This commit is contained in:
Abdessamad Derraz committed 2026-10-18 03:51:57 +02:00
1 parent 97c973c7e2
commit a40a68c1f7
4 files changed
+100 -9

No files matched your search

+25 -1
View File
@@ -14,7 +14,7 @@ from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parent.parent
sys.path.insert(0, str(REPO_ROOT / "scripts"))
from packextras import extra_region_groups # noqa: E402
from packextras import extra_region_groups, system_spellings # noqa: E402
class TheGroupFollowsWhatTheProfileSays(unittest.TestCase):
@@ -63,5 +63,29 @@ class TheEnterpriseKeepsItsRom(unittest.TestCase):
self.assertNotIn("bios/brd.rom", drops)
class TheGroupTakesThePlatformSpelling(unittest.TestCase):
def test_a_profile_spelling_maps_to_the_platform_one(self):
spellings = system_spellings(["sega-master-system", "sony-playstation"])
self.assertEqual(
extra_region_groups({"source_system": "sega-mastersystem"}, spellings),
["sega-master-system"],
)
def test_a_system_the_platform_lacks_keeps_its_name(self):
spellings = system_spellings(["sony-playstation"])
self.assertEqual(
extra_region_groups({"source_systems": ["sega-saturn"]}, spellings),
["sega-saturn"],
)
def test_file_and_variant_groups_are_untouched(self):
spellings = system_spellings(["sega-megacd"])
self.assertEqual(
extra_region_groups({"source_emulator": "picodrive", "variant_group": "mcd",
"source_system": "sega-megacd"}, spellings),
["picodrive:variant:mcd"],
)
if __name__ == "__main__":
unittest.main()