mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-29 15:17:20 -05:00
feat: accept ISO country codes for --region
jp, us, kr and gb were aliases but au was unknown, and the first spelling offered for it was auto, which means world. Every territory of the region tree now answers to its ISO 3166-1 code, in the build scripts and in the installer, whose SHA-256 is pinned again.
This commit is contained in:
1 parent
4e41fad9b6
commit
10dc9a11ac
6 files changed
+74
-5
No files matched your search
@@ -1048,6 +1048,24 @@ class UnknownRegionSaysWhatToType(unittest.TestCase):
|
||||
self.assertIn("Short forms:", str(caught.exception))
|
||||
|
||||
|
||||
class CountryCodesNameTheirTerritory(unittest.TestCase):
|
||||
"""`au` was unknown while `jp`, `us`, `kr` and `gb` were aliases, and the
|
||||
first spelling offered for it was `auto`, which means world."""
|
||||
|
||||
def test_au_is_australia(self):
|
||||
self.assertEqual(region.parse_requested("au,jp"), ["australia", "japan"])
|
||||
|
||||
def test_every_territory_answers_to_a_two_letter_code(self):
|
||||
areas = set(region.AREA_TERRITORIES)
|
||||
territories = {
|
||||
member for members in region.REGION_TREE.values() for member in members
|
||||
} - areas
|
||||
coded = {
|
||||
target for alias, target in region.ALIASES.items() if len(alias) == 2
|
||||
} | {slug for slug in territories if len(slug) == 2}
|
||||
self.assertEqual(territories - coded, set())
|
||||
|
||||
|
||||
|
||||
class GenesisPlusGxUsBiosServesEurope(unittest.TestCase):
|
||||
"""sms_cart_region_detect returns REGION_USA for any export header
|
||||
|
||||
Reference in new issue
Block a user