fix: help names only keys the route sends

This commit is contained in:
Abdessamad Derraz committed 2026-10-26 21:18:30 +01:00
1 parent fad5b10665
commit ae3faec86b
7 files changed
+52 -21

No files matched your search

+3 -3
View File
@@ -1140,10 +1140,10 @@
Y, Tab, o Options
B, Select, Esc Back
q, Ctrl-C Quit
?, F1 This help
BIOS folder:
/home/user/.config/retroarch/system
Any key closes this help
=== help 40x15
RetroBIOS: Keys
@@ -1153,13 +1153,13 @@
Y, Tab, o Options
B, Select, Esc Back
q, Ctrl-C Quit
?, F1 This help
BIOS folder:
/home/user/.config/retroarch/system
Any key closes this help
=== help 80x24
RetroBIOS: Keys
@@ -1169,7 +1169,6 @@
Y, Tab, o Options
B, Select, Esc Back
q, Ctrl-C Quit
?, F1 This help
BIOS folder: /home/user/.config/retroarch/system
@@ -1185,4 +1184,5 @@
Any key closes this help
+4 -4
View File
@@ -1141,9 +1141,9 @@
B, Select, Esc Back
q, Ctrl-C Quit
Select, then Start Quit at once
?, F1 This help
BIOS folder:
/home/user/.config/retroarch/system
Any key closes this help
=== help 40x15
RetroBIOS: Keys
@@ -1154,12 +1154,12 @@
B, Select, Esc Back
q, Ctrl-C Quit
Select, then Start Quit at once
?, F1 This help
BIOS folder:
/home/user/.config/retroarch/system
Any key closes this help
=== help 80x24
RetroBIOS: Keys
@@ -1170,7 +1170,6 @@
B, Select, Esc Back
q, Ctrl-C Quit
Select, then Start Quit at once
?, F1 This help
BIOS folder: /home/user/.config/retroarch/system
@@ -1185,4 +1184,5 @@
Any key closes this help
+4 -4
View File
@@ -1141,9 +1141,9 @@
B, Select, Esc Back
q, Ctrl-C Quit
Select, then Start Quit at once
?, F1 This help
BIOS folder:
/home/user/.config/retroarch/system
Any key closes this help
=== help 40x15
RetroBIOS: Keys
@@ -1154,12 +1154,12 @@
B, Select, Esc Back
q, Ctrl-C Quit
Select, then Start Quit at once
?, F1 This help
BIOS folder:
/home/user/.config/retroarch/system
Any key closes this help
=== help 80x24
RetroBIOS: Keys
@@ -1170,7 +1170,6 @@
B, Select, Esc Back
q, Ctrl-C Quit
Select, then Start Quit at once
?, F1 This help
BIOS folder: /home/user/.config/retroarch/system
@@ -1185,4 +1184,5 @@
Any key closes this help
+4 -4
View File
@@ -1141,9 +1141,9 @@
R2, Esc, Backspace Back
q, Ctrl-C Quit
B Sends no key here
?, F1 This help
BIOS folder:
/home/user/.config/retroarch/system
Any key closes this help
=== help 40x15
RetroBIOS: Keys
@@ -1154,12 +1154,12 @@
R2, Esc, Backspace Back
q, Ctrl-C Quit
B Sends no key here
?, F1 This help
BIOS folder:
/home/user/.config/retroarch/system
Any key closes this help
=== help 80x24
RetroBIOS: Keys
@@ -1170,7 +1170,6 @@
R2, Esc, Backspace Back
q, Ctrl-C Quit
B Sends no key here
?, F1 This help
BIOS folder: /home/user/.config/retroarch/system
@@ -1185,4 +1184,5 @@
Any key closes this help
+3 -3
View File
@@ -1142,7 +1142,7 @@
q, Ctrl-C Quit
Select Keyboard on or off
Menu Close the terminal
?, F1 This help
Any key closes this help
=== help 40x15
@@ -1155,11 +1155,11 @@
q, Ctrl-C Quit
Select Keyboard on or off
Menu Close the terminal
?, F1 This help
BIOS folder:
/home/user/.config/retroarch/system
Any key closes this help
=== help 80x24
RetroBIOS: Keys
@@ -1171,7 +1171,6 @@
q, Ctrl-C Quit
Select Keyboard on or off
Menu Close the terminal
?, F1 This help
BIOS folder: /home/user/.config/retroarch/system
@@ -1185,4 +1184,5 @@
Any key closes this help
+22
View File
@@ -3940,6 +3940,28 @@ class GameDataIsNoFirmwareAlarm(unittest.TestCase):
self.assertIn("Anims.j2a (Jazz Jackrabbit 2)", lines[1])
class TheHelpNamesKeysThatCome(unittest.TestCase):
"""Every route's help listed "?, F1 This help", which no pad sends, and
a key as wide as the column touched its text."""
def test_pad_routes_name_no_help_key(self):
for pad in ROUTES:
with self.subTest(route=pad):
state = checked_state()
state.pad = pad
keys = [key for key, _what in install._help_lines(state)]
self.assertEqual("?, F1" in keys, pad == "keys")
def test_a_wide_key_keeps_two_spaces(self):
state = checked_state()
state.help = True
with mock.patch.object(install, "_help_lines",
return_value=[("A, Start, Enter, Space, x", "Choose"),
("q", "Quit")]):
lines = install._view_help(state, 80, 24)[1]
self.assertTrue(any("A, Start, Enter, Space, x Choose" in line for line in lines))
class NothingFoundIsSaid(unittest.TestCase):
"""With nothing detected the first screen was the list of 18 setups,
with no line at 40x15 saying nothing was found, which the beginner's