mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-04 17:13:46 -06:00
fix: let taiwan and asia-ntsc answer each other
kronos tags the ST-V BIOS epr-19854.ic8 taiwan, mednafen_stv tags it asia-ntsc, the SMPC area Mednafen names for Taiwan (ss.cpp:1119, 2363-2364). As siblings under asia they never matched, so a request in one spelling dropped the file tagged in the other, and --region taiwan,us dropped the Saturn sega_101.bin. AREA_TERRITORIES relates each area to the territory it serves, china for asia-pal included, in region.py and its installer copy.
This commit is contained in:
1 parent
e318bb4503
commit
7bcd41e0c4
7 files changed
+56
-8
No files matched your search
@@ -40,6 +40,7 @@ class OneRegionVocabulary(unittest.TestCase):
|
||||
|
||||
def test_the_copy_matches(self):
|
||||
self.assertEqual(install.REGION_TREE, dict(region.REGION_TREE))
|
||||
self.assertEqual(install.AREA_TERRITORIES, dict(region.AREA_TERRITORIES))
|
||||
self.assertEqual(install.REGION_ALIASES, region.ALIASES)
|
||||
self.assertEqual(install.WORLD_REGION, region.WORLD)
|
||||
self.assertEqual(install.REGIONS, region.REGIONS)
|
||||
@@ -49,7 +50,8 @@ class TheRegionRuleIsTheBuilders(unittest.TestCase):
|
||||
"""Random groups, both implementations, one answer."""
|
||||
|
||||
POOL = ["north-america", "europe", "japan", "uk", "canada", "brazil",
|
||||
"south-korea", "world", "asia", "oceania"]
|
||||
"south-korea", "world", "asia", "oceania", "taiwan", "asia-ntsc",
|
||||
"china", "asia-pal"]
|
||||
|
||||
def _case(self, rng: random.Random):
|
||||
groups: dict[str, list[tuple[str, str]]] = {}
|
||||
@@ -79,7 +81,8 @@ class TheRegionRuleIsTheBuilders(unittest.TestCase):
|
||||
if not entry["regions"]:
|
||||
del entry["regions"], entry["region_groups"]
|
||||
entry.pop("priority", None)
|
||||
requested = rng.sample(["north-america", "europe", "japan", "uk", "canada"],
|
||||
requested = rng.sample(["north-america", "europe", "japan", "uk", "canada",
|
||||
"taiwan", "asia-ntsc", "china", "asia-pal"],
|
||||
rng.randint(1, 3))
|
||||
return groups, index, list(entries.values()), requested
|
||||
|
||||
|
||||
@@ -58,6 +58,17 @@ class TestComparable(unittest.TestCase):
|
||||
def test_saturn_fused_slug_is_under_asia(self):
|
||||
self.assertTrue(region.comparable("asia", "asia-ntsc"))
|
||||
|
||||
def test_an_area_matches_the_territory_it_serves(self):
|
||||
"""kronos tags the ST-V BIOS epr-19854.ic8 taiwan, mednafen_stv tags
|
||||
it asia-ntsc, the SMPC area Mednafen names for Taiwan."""
|
||||
self.assertTrue(region.comparable("taiwan", "asia-ntsc"))
|
||||
self.assertTrue(region.comparable("asia-ntsc", "taiwan"))
|
||||
self.assertTrue(region.comparable("china", "asia-pal"))
|
||||
|
||||
def test_an_area_does_not_match_other_territories(self):
|
||||
self.assertFalse(region.comparable("japan", "asia-ntsc"))
|
||||
self.assertFalse(region.comparable("taiwan", "asia-pal"))
|
||||
|
||||
|
||||
class TestNormalizeDeclared(unittest.TestCase):
|
||||
def test_none_is_empty(self):
|
||||
@@ -889,6 +900,9 @@ class RegionalRequestsKeepWhatTheCodeLoads(unittest.TestCase):
|
||||
("ace-dl", ["france"], "private/firmware/Amstrad_s4.cpr"),
|
||||
("duckstation", ["brazil"], "scph5501.bin"),
|
||||
("duckstation", ["south-korea"], "scph5500.bin"),
|
||||
("mednafen_stv", ["taiwan", "north-america"], "epr-19854.ic8"),
|
||||
("kronos", ["asia-ntsc", "north-america"], "epr-19854.ic8"),
|
||||
("beetle_saturn", ["taiwan", "north-america"], "sega_101.bin"),
|
||||
("pcsx_rearmed", ["brazil", "japan"], "scph5501.bin"),
|
||||
("pcsx_rearmed", ["brazil", "japan"], "scph1001.bin"),
|
||||
("blastem", ["australia", "north-america"], "bios_CD_E.bin"),
|
||||
|
||||
Reference in new issue
Block a user