mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-14 22:13:47 -06:00
fix: read a RetroDECK bios dest as its folder
This commit is contained in:
1 parent
896dbc8660
commit
7da6e117a3
5 files changed
+37
-10
No files matched your search
@@ -823,6 +823,27 @@ class APartlyClosedHome(unittest.TestCase):
|
||||
self.assertEqual([entry["bios_dir"] for entry in detect["platforms"]], [str(system)])
|
||||
|
||||
|
||||
class RetroDeckBiosFolderNamedAsDest(unittest.TestCase):
|
||||
"""`--platform retrodeck --dest ~/retrodeck/bios`, as --help asks for a
|
||||
BIOS folder, put every file under bios/bios, which RetroDECK never reads."""
|
||||
|
||||
def test_the_files_go_below_the_retrodeck_folder(self):
|
||||
root = Path(tempfile.mkdtemp(dir=REPO_ROOT / "tmp"))
|
||||
self.addCleanup(shutil.rmtree, root, True)
|
||||
(root / "bios").mkdir()
|
||||
choice = install.card_choice("retrodeck", "retrodeck", root / "bios")
|
||||
self.assertEqual(choice.folder, root)
|
||||
self.assertIn("RetroDECK's BIOS folder", choice.note)
|
||||
self.assertFalse(choice.refused)
|
||||
|
||||
def test_the_retrodeck_folder_itself_is_kept(self):
|
||||
root = Path(tempfile.mkdtemp(dir=REPO_ROOT / "tmp"))
|
||||
self.addCleanup(shutil.rmtree, root, True)
|
||||
(root / "bios").mkdir()
|
||||
choice = install.card_choice("retrodeck", "retrodeck", root)
|
||||
self.assertEqual((choice.folder, choice.note), (root, ""))
|
||||
|
||||
|
||||
class AnUnreadableRetroArchConfigIsSaid(unittest.TestCase):
|
||||
"""A retroarch.cfg a `sudo retroarch` left at 0600 for root was read as
|
||||
no config at all: RetroArch was not found and nothing said why."""
|
||||
|
||||
Reference in new issue
Block a user