mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-29 15:17:20 -05:00
fix: give the bare platform menu its default
With nothing detected, the menu had no Enter default, while --help and the --dest menu name RetroArch as the fallback. Its title now also says why the question is asked.
This commit is contained in:
1 parent
19b4ef5de4
commit
778d2d56e6
4 files changed
+14
-3
No files matched your search
@@ -1808,6 +1808,16 @@ class TestManualPlatformPrompt(unittest.TestCase):
|
||||
chosen, [("retroarch", Path.home() / ".config" / "retroarch" / "system")]
|
||||
)
|
||||
|
||||
def test_enter_takes_retroarch_as_the_dest_menu_does(self):
|
||||
"""The --dest menu offered `[Enter for RetroArch]` and this one, the
|
||||
same list, had no default."""
|
||||
answers = iter(["", ""])
|
||||
out = io.StringIO()
|
||||
with unittest.mock.patch("builtins.input", lambda _prompt="": next(answers)), \
|
||||
contextlib.redirect_stdout(out):
|
||||
chosen = install._prompt_manual_platform("linux")
|
||||
self.assertEqual(chosen[0][0], "retroarch")
|
||||
|
||||
def test_name_and_explicit_directory(self):
|
||||
answers = iter(["batocera", "~/my bios"])
|
||||
with unittest.mock.patch("builtins.input", lambda _prompt="": next(answers)):
|
||||
|
||||
Reference in new issue
Block a user