fix: name RETROBIOS_REF when a list is too old

This commit is contained in:
Abdessamad Derraz committed 2026-10-18 08:25:26 +02:00
1 parent ebf44d523b
commit fe35de9607
5 files changed
+37 -6

No files matched your search

+1 -1
View File
@@ -379,7 +379,7 @@ class TheOneLinerReadsInstalledCores(unittest.TestCase):
(repo.root / "cores" / "mgba_libretro.so").write_bytes(b"")
proc = repo.run("--installed-cores")
self.assertEqual(proc.returncode, 1)
self.assertIn("needs a newer one", proc.stderr)
self.assertIn("older release", proc.stderr)
def test_a_platform_that_ships_its_cores_refuses_the_flag(self):
with _CoreRepository() as repo:
+14
View File
@@ -374,6 +374,20 @@ class TheOneLinerNarrows(unittest.TestCase):
self.assertIn("records no systems or regions", proc.stderr)
self.assertEqual(repo.installed(), [])
def test_a_pinned_ref_is_named_as_the_way_out(self):
"""RETROBIOS_REF=<tag>, which the docs suggest for reproducibility,
selects lists from before narrowing existed; the error said only
"narrowing needs a newer one"."""
with FakeRepository(selection=False) as repo:
proc = subprocess.run(
repo.command("--region", "us"),
env={**repo.env(), "RETROBIOS_REF": "v2026.10.10"},
capture_output=True, text=True, timeout=60, check=False,
stdin=subprocess.DEVNULL,
)
self.assertEqual(proc.returncode, 1)
self.assertIn("unset RETROBIOS_REF", proc.stderr)
def test_empty_names_are_a_usage_error(self):
with FakeRepository() as repo:
for option in (["--region", " , "], ["--system", ""], ["--core", ","]):