fix: polish the screens audit 11 named

Long messages scroll with their position, a small window says why the
questions come line by line, one bar rule per width, the folder a
config names sits under it and wraps whole, the help while typing a
filter lists what does not type, the plan names --core and --region,
pc finds the computer setups, rows keep sizes near their names, a
partial result counts once, a quit is said as one, the WSL browser
names drives by letter and No connection names the pack.
This commit is contained in:
Abdessamad Derraz committed 2026-10-27 16:27:47 +01:00
1 parent 302c7737b2
commit 39c2809a4b
37 files changed
+345 -584

No files matched your search

+1 -1
View File
@@ -9,4 +9,4 @@
Ctrl-C Quit B/Esc Quit
Ctrl-C Quit B Quit
+1 -1
View File
@@ -12,4 +12,4 @@
Ctrl-C Quit B/Esc Quit
Ctrl-C Quit B Quit
+1 -1
View File
@@ -9,4 +9,4 @@
A/Enter Back
A Back
+1 -1
View File
@@ -12,4 +12,4 @@
A/Enter Back
A Back
+1 -1
View File
@@ -9,4 +9,4 @@
> Install
Back
A/Enter Install B/Esc Back ? Help
A Install B Back ? Help
+1 -1
View File
@@ -12,4 +12,4 @@
A/Enter Install B/Esc Back ? Help
A Install B Back ? Help
+1 -1
View File
@@ -9,4 +9,4 @@
A/Enter Create B/Esc Quit
A Create B Quit
+1 -1
View File
@@ -12,4 +12,4 @@
A/Enter Create B/Esc Quit
A Create B Quit
+3 -3
View File
@@ -5,8 +5,8 @@
-2] Name or service not known
Address:
https://raw.githubusercontent.com/
Abdess/retrobios/main/install/
retroarch.json
1-5 of 7
> Choose another setup or folder
Quit
A/Enter Choose B/Esc Back
A Choose B Back PgUp/PgDn Scroll
+1 -1
View File
@@ -12,4 +12,4 @@
Quit
A/Enter Choose B/Esc Back
A Choose B Back
+1 -1
View File
@@ -9,4 +9,4 @@
> Browse for a folder
Type a path
Look again
A/Enter Browse B/Esc Back ? Help
A Browse B Back ? Help
+1 -1
View File
@@ -12,4 +12,4 @@
Look again
A/Enter Browse B/Esc Back ? Help
A Browse B Back ? Help
+1 -1
View File
@@ -9,4 +9,4 @@
FAILED scph5500.bin (HTTP 404)
ok gba_bios.bin
B/Esc Stop ? Help
B Stop ? Help
+1 -1
View File
@@ -12,4 +12,4 @@
B/Esc Stop ? Help
B Stop ? Help
+8 -8
View File
@@ -2,14 +2,14 @@
Each row is an option of the command line, named on the right.
> Preferred regions: North America, Japan --region
Game data: kept --no-game-data
Installed cores only: no (1 found) --installed-cores
Cores: all --core
Parallel downloads: 8 --jobs
BIOS folder: ~/.config/retroarch/system --dest
Copy from: none --from
Preview the file list --dry-run
> Preferred regions: North America, Japan --region
Game data: kept --no-game-data
Installed cores only: no (1 found) --installed-cores
Cores: all --core
Parallel downloads: 8 --jobs
BIOS folder: ~/.config/retroarch/system --dest
Copy from: none --from
Preview the file list --dry-run
Show the command line
+13 -13
View File
@@ -14,26 +14,26 @@
BizHawk
MiSTer FPGA
RetroPie
Allium, SD card Miyoo Mini, Miyoo Mini Plus, Miyoo Mini Flip
AmberELEC, SD card RG351, RG552
Anbernic stock firmware, SD card RG35XX Plus, RG35XX H, RG35XX SP, RG28XX
Allium, SD card Miyoo Mini, Miyoo Mini Plus, Miyoo Mini Flip
AmberELEC, SD card RG351, RG552
Anbernic stock firmware, SD card RG35XX Plus, RG35XX H, RG35XX SP, RG28XX
ArchR, SD card R36S, R33S, R36S Soysauce, Odroid Go Advance, Odroid Go Super, RG351V, +6
ArkOS, SD card RG353M, RG353V, RG503, RGB30, RK2023, RG351MP, RG351V, R35S, RGB10
CrossMix-OS, SD card TrimUI Smart Pro
dArkOS, SD card Odroid Go Advance, RGB10, RG351MP, G350
EmuELEC, SD card Odroid Go
ArkOS, SD card RG353M, RG353V, RG503, RGB30, RK2023, RG351MP, RG351V, R35S, RGB10
CrossMix-OS, SD card TrimUI Smart Pro
dArkOS, SD card Odroid Go Advance, RGB10, RG351MP, G350
EmuELEC, SD card Odroid Go
JELOS, SD card RG351M, RG351V, RG353M, RG353P, RG353V, RG353VS, RG503, RG552, R33S, R36S, +24
KNULLI, SD card RG ARC-S, RG28XX, RG34XX, RG35XX, RG35XX Plus, RG35XX H, RG35XX 2024, +15
KOLOS, SD card RG353P, RG353M, RG353V, RG353VS, RG503, RK2023, RGB30, RGB10 Max 3
Koriki, SD card Miyoo Mini
KOLOS, SD card RG353P, RG353M, RG353V, RG353VS, RG503, RK2023, RGB30, RGB10 Max 3
Koriki, SD card Miyoo Mini
MinUI, SD card RG28XX, RG34XX, RG34XX SP, RG35XX, RG35XX Plus, RG35XX H, RG35XX SP, +16
MiyooCFW, SD card BittBoy, Pocket Go, PowKiddy Q90, PowKiddy V90, PowKiddy Q20 Mini, Sup M3, +1
muOS, SD card RG35XX H, RG35XX Plus, RG35XX SP, RG35XX 2024, RG34XX, RG40XX H, RG40XX V, +4
MyMinUI, SD card RG35XX, Miyoo Mini, Miyoo Mini Flip, Miyoo Mini Plus, Miyoo A30, +16
NextUI, SD card TrimUI Brick, TrimUI Smart Pro
Onion, SD card Miyoo Mini, Miyoo Mini Plus
plumOS, SD card MagicX XU20 V32
RetroOZ, SD card Odroid Go Super, Odroid Go Advance, RGB10 Max, RGB10 Max 2
NextUI, SD card TrimUI Brick, TrimUI Smart Pro
Onion, SD card Miyoo Mini, Miyoo Mini Plus
plumOS, SD card MagicX XU20 V32
RetroOZ, SD card Odroid Go Super, Odroid Go Advance, RGB10 Max, RGB10 Max 2
ROCKNIX, SD card RG351, RG353, RG503, RG552, RG 55G1, RG ARC, RG35XX 2024, RG35XX Plus, +37
spruceOS, SD card Miyoo A30, Miyoo Flip, Miyoo Mini, Miyoo Mini Plus, Miyoo Mini Flip, +5
UnofficialOS, SD card R35S, R36S, RG351M, RG351P, RG351V, RG353M, RG353P, RG353V, RG503, +5
+1 -1
View File
@@ -9,4 +9,4 @@
missing 16.0 KB gba_bios.bin
A/Enter Back
A Back
+1 -1
View File
@@ -12,4 +12,4 @@
A/Enter Back
A Back
+1 -1
View File
@@ -9,4 +9,4 @@
A/Enter Quit B/Esc Stay
A Quit B Stay
+1 -1
View File
@@ -12,4 +12,4 @@
A/Enter Quit B/Esc Stay
A Quit B Stay
+1 -1
View File
@@ -9,4 +9,4 @@
To put them back: python3 install.py
1-8 of 17
A/Enter Exit Up/Down Scroll
A Exit ^v Scroll
+1 -1
View File
@@ -12,4 +12,4 @@
/home/user/.config/retroarch/retrobios-backup/2026-10-23_1200
1-11 of 17
A/Enter Exit Up/Down Scroll
A Exit ^v Scroll
+6 -138
View File
@@ -322,35 +322,6 @@
A Use this folder B Back
=== create 40x12
RetroBIOS: Create the folder?
/home/user/bios/new does not exist.
The nearest folder that does:
/home/user
> Create it and continue
Choose another folder
A Create B Quit
=== create 40x15
RetroBIOS: Create the folder?
/home/user/bios/new does not exist.
The nearest folder that does:
/home/user
> Create it and continue
Choose another folder
A Create B Quit
=== create 80x24
RetroBIOS: Create the folder?
@@ -604,7 +575,7 @@
Copy from: none
Preview the file list
Show the command line
A Open B Back Left/Right Set
A Open B Back <> Set
=== options 40x15
RetroBIOS: Options
@@ -620,7 +591,7 @@
Sets --region
A Open B Back Left/Right Set
A Open B Back <> Set
=== options 80x24
RetroBIOS: Options
@@ -658,7 +629,7 @@
[ ] Japan
A Tick B Done Left/Right Order
A Tick B Done <> Order
=== regions 40x15
RetroBIOS: Preferred regions
@@ -674,7 +645,7 @@
A Tick B Done Left/Right Order
A Tick B Done <> Order
=== regions 80x24
RetroBIOS: Preferred regions
@@ -754,35 +725,6 @@
A Filter B Back X Tick
=== preview 40x12
RetroBIOS: Preview
4 files to download, 1.0 MB. Nothing
is written.
missing 512.0 KB scph5500.bin
wrong copy 512.0 KB scph5501.bin
missing 4 B pcsx/extra.bin
missing 16.0 KB gba_bios.bin
A Back
=== preview 40x15
RetroBIOS: Preview
4 files to download, 1.0 MB. Nothing
is written.
missing 512.0 KB scph5500.bin
wrong copy 512.0 KB scph5501.bin
missing 4 B pcsx/extra.bin
missing 16.0 KB gba_bios.bin
A Back
=== preview 80x24
RetroBIOS: Preview
@@ -807,35 +749,6 @@
A Back
=== command 40x12
RetroBIOS: Command line
The same choice without questions:
python3 install.py --platform
retroarch --dest
/home/user/.config/retroarch/system
--system nintendo-gba
A Back
=== command 40x15
RetroBIOS: Command line
The same choice without questions:
python3 install.py --platform
retroarch --dest
/home/user/.config/retroarch/system
--system nintendo-gba
A Back
=== command 80x24
RetroBIOS: Command line
@@ -1032,27 +945,11 @@
-2] Name or service not known
Address:
https://raw.githubusercontent.com/
Abdess/retrobios/main/install/
retroarch.json
> Choose another setup or folder
Quit
A Choose B Back
=== error 40x15
RetroBIOS: Something went wrong
Could not fetch the file list for
retroarch after 3 attempts: [Errno
-2] Name or service not known
Address:
https://raw.githubusercontent.com/
Abdess/retrobios/main/install/
retroarch.json
1-5 of 7
> Choose another setup or folder
Quit
A Choose B Back
A Choose B Back L1/R1 Scroll
=== error 80x24
RetroBIOS: Something went wrong
@@ -1078,35 +975,6 @@
A Choose B Back
=== quit 40x12
RetroBIOS: Quit?
Quit without installing? Nothing was
written.
> Quit
Stay
A Quit B Stay
=== quit 40x15
RetroBIOS: Quit?
Quit without installing? Nothing was
written.
> Quit
Stay
A Quit B Stay
=== quit 80x24
RetroBIOS: Quit?
+6 -138
View File
@@ -322,35 +322,6 @@
A Use this folder B Back
=== create 40x12
RetroBIOS: Create the folder?
/home/user/bios/new does not exist.
The nearest folder that does:
/home/user
> Create it and continue
Choose another folder
A Create B Quit
=== create 40x15
RetroBIOS: Create the folder?
/home/user/bios/new does not exist.
The nearest folder that does:
/home/user
> Create it and continue
Choose another folder
A Create B Quit
=== create 80x24
RetroBIOS: Create the folder?
@@ -604,7 +575,7 @@
Copy from: none
Preview the file list
Show the command line
A Open B Back Left/Right Set
A Open B Back <> Set
=== options 40x15
RetroBIOS: Options
@@ -620,7 +591,7 @@
Sets --region
A Open B Back Left/Right Set
A Open B Back <> Set
=== options 80x24
RetroBIOS: Options
@@ -658,7 +629,7 @@
[ ] Japan
A Tick B Done Left/Right Order
A Tick B Done <> Order
=== regions 40x15
RetroBIOS: Preferred regions
@@ -674,7 +645,7 @@
A Tick B Done Left/Right Order
A Tick B Done <> Order
=== regions 80x24
RetroBIOS: Preferred regions
@@ -754,35 +725,6 @@
A Filter B Back X Tick
=== preview 40x12
RetroBIOS: Preview
4 files to download, 1.0 MB. Nothing
is written.
missing 512.0 KB scph5500.bin
wrong copy 512.0 KB scph5501.bin
missing 4 B pcsx/extra.bin
missing 16.0 KB gba_bios.bin
A Back
=== preview 40x15
RetroBIOS: Preview
4 files to download, 1.0 MB. Nothing
is written.
missing 512.0 KB scph5500.bin
wrong copy 512.0 KB scph5501.bin
missing 4 B pcsx/extra.bin
missing 16.0 KB gba_bios.bin
A Back
=== preview 80x24
RetroBIOS: Preview
@@ -807,35 +749,6 @@
A Back
=== command 40x12
RetroBIOS: Command line
The same choice without questions:
python3 install.py --platform
retroarch --dest
/home/user/.config/retroarch/system
--system nintendo-gba
A Back
=== command 40x15
RetroBIOS: Command line
The same choice without questions:
python3 install.py --platform
retroarch --dest
/home/user/.config/retroarch/system
--system nintendo-gba
A Back
=== command 80x24
RetroBIOS: Command line
@@ -1032,27 +945,11 @@
-2] Name or service not known
Address:
https://raw.githubusercontent.com/
Abdess/retrobios/main/install/
retroarch.json
> Choose another setup or folder
Quit
A Choose B Back
=== error 40x15
RetroBIOS: Something went wrong
Could not fetch the file list for
retroarch after 3 attempts: [Errno
-2] Name or service not known
Address:
https://raw.githubusercontent.com/
Abdess/retrobios/main/install/
retroarch.json
1-5 of 7
> Choose another setup or folder
Quit
A Choose B Back
A Choose B Back L1/R1 Scroll
=== error 80x24
RetroBIOS: Something went wrong
@@ -1078,35 +975,6 @@
A Choose B Back
=== quit 40x12
RetroBIOS: Quit?
Quit without installing? Nothing was
written.
> Quit
Stay
A Quit B Stay
=== quit 40x15
RetroBIOS: Quit?
Quit without installing? Nothing was
written.
> Quit
Stay
A Quit B Stay
=== quit 80x24
RetroBIOS: Quit?
+5 -137
View File
@@ -322,35 +322,6 @@
A Use this folder B Back
=== create 40x12
RetroBIOS: Create the folder?
/home/user/bios/new does not exist.
The nearest folder that does:
/home/user
> Create it and continue
Choose another folder
A Create B Quit
=== create 40x15
RetroBIOS: Create the folder?
/home/user/bios/new does not exist.
The nearest folder that does:
/home/user
> Create it and continue
Choose another folder
A Create B Quit
=== create 80x24
RetroBIOS: Create the folder?
@@ -604,7 +575,7 @@
Copy from: none
Preview the file list
Show the command line
A Open B Back Left/Right Set
A Open B Back <> Set
=== options 40x15
RetroBIOS: Options
@@ -620,7 +591,7 @@
Sets --region
A Open B Back Left/Right Set
A Open B Back <> Set
=== options 80x24
RetroBIOS: Options
@@ -658,7 +629,7 @@
[ ] Japan
A Tick B Done Left/Right Order
A Tick B Done <> Order
=== regions 40x15
RetroBIOS: Preferred regions
@@ -674,7 +645,7 @@
A Tick B Done Left/Right Order
A Tick B Done <> Order
=== regions 80x24
RetroBIOS: Preferred regions
@@ -754,35 +725,6 @@
A Filter B Back X Tick
=== preview 40x12
RetroBIOS: Preview
4 files to download, 1.0 MB. Nothing
is written.
missing 512.0 KB scph5500.bin
wrong copy 512.0 KB scph5501.bin
missing 4 B pcsx/extra.bin
missing 16.0 KB gba_bios.bin
A Back
=== preview 40x15
RetroBIOS: Preview
4 files to download, 1.0 MB. Nothing
is written.
missing 512.0 KB scph5500.bin
wrong copy 512.0 KB scph5501.bin
missing 4 B pcsx/extra.bin
missing 16.0 KB gba_bios.bin
A Back
=== preview 80x24
RetroBIOS: Preview
@@ -807,35 +749,6 @@
A Back
=== command 40x12
RetroBIOS: Command line
The same choice without questions:
python3 install.py --platform
retroarch --dest
/home/user/.config/retroarch/system
--system nintendo-gba
A Back
=== command 40x15
RetroBIOS: Command line
The same choice without questions:
python3 install.py --platform
retroarch --dest
/home/user/.config/retroarch/system
--system nintendo-gba
A Back
=== command 80x24
RetroBIOS: Command line
@@ -1032,26 +945,10 @@
-2] Name or service not known
Address:
https://raw.githubusercontent.com/
Abdess/retrobios/main/install/
retroarch.json
> Choose another setup or folder
Quit
A Choose B Back
=== error 40x15
RetroBIOS: Something went wrong
Could not fetch the file list for
retroarch after 3 attempts: [Errno
-2] Name or service not known
Address:
https://raw.githubusercontent.com/
Abdess/retrobios/main/install/
retroarch.json
1-5 of 7
> Choose another setup or folder
Quit
A Choose B Back
=== error 80x24
RetroBIOS: Something went wrong
@@ -1078,35 +975,6 @@
A Choose B Back
=== quit 40x12
RetroBIOS: Quit?
Quit without installing? Nothing was
written.
> Quit
Stay
A Quit B Stay
=== quit 40x15
RetroBIOS: Quit?
Quit without installing? Nothing was
written.
> Quit
Stay
A Quit B Stay
=== quit 80x24
RetroBIOS: Quit?
+4 -4
View File
@@ -928,7 +928,7 @@
To put them back: python3 install.py
1-8 of 17
Enter Exit Up/Down Scroll
Enter Exit ^v Scroll
=== result 40x15
RetroBIOS: Finished with errors
@@ -944,7 +944,7 @@
/home/user/.config/retroarch/retrobios-backup/2026-10-23_1200
1-11 of 17
Enter Exit Up/Down Scroll
Enter Exit ^v Scroll
=== result 80x24
RetroBIOS: Finished with errors
@@ -978,8 +978,8 @@
-2] Name or service not known
Address:
https://raw.githubusercontent.com/
Abdess/retrobios/main/install/
retroarch.json
1-5 of 7
> Choose another setup or folder
Quit
Enter Choose Esc Back
+7 -65
View File
@@ -604,7 +604,7 @@
Copy from: none
Preview the file list
Show the command line
A Open R2 Back Left/Right Set
A Open R2 Back <> Set
=== options 40x15
RetroBIOS: Options
@@ -620,7 +620,7 @@
Sets --region
A Open R2 Back Left/Right Set
A Open R2 Back <> Set
=== options 80x24
RetroBIOS: Options
@@ -658,7 +658,7 @@
[ ] Japan
A Tick R2 Done Left/Right Order
A Tick R2 Done <> Order
=== regions 40x15
RetroBIOS: Preferred regions
@@ -674,7 +674,7 @@
A Tick R2 Done Left/Right Order
A Tick R2 Done <> Order
=== regions 80x24
RetroBIOS: Preferred regions
@@ -754,35 +754,6 @@
A Filter R2 Back
=== preview 40x12
RetroBIOS: Preview
4 files to download, 1.0 MB. Nothing
is written.
missing 512.0 KB scph5500.bin
wrong copy 512.0 KB scph5501.bin
missing 4 B pcsx/extra.bin
missing 16.0 KB gba_bios.bin
A Back
=== preview 40x15
RetroBIOS: Preview
4 files to download, 1.0 MB. Nothing
is written.
missing 512.0 KB scph5500.bin
wrong copy 512.0 KB scph5501.bin
missing 4 B pcsx/extra.bin
missing 16.0 KB gba_bios.bin
A Back
=== preview 80x24
RetroBIOS: Preview
@@ -807,35 +778,6 @@
A Back
=== command 40x12
RetroBIOS: Command line
The same choice without questions:
python3 install.py --platform
retroarch --dest
/home/user/.config/retroarch/system
--system nintendo-gba
A Back
=== command 40x15
RetroBIOS: Command line
The same choice without questions:
python3 install.py --platform
retroarch --dest
/home/user/.config/retroarch/system
--system nintendo-gba
A Back
=== command 80x24
RetroBIOS: Command line
@@ -1032,11 +974,11 @@
-2] Name or service not known
Address:
https://raw.githubusercontent.com/
Abdess/retrobios/main/install/
retroarch.json
1-5 of 7
> Choose another setup or folder
Quit
A Choose R2 Back
A Choose R2 Back L1/R1 Scroll
=== error 40x15
RetroBIOS: Something went wrong
+6 -6
View File
@@ -604,7 +604,7 @@
Copy from: none
Preview the file list
Show the command line
Start Open B Back Left/Right Set
Start Open B Back <> Set
=== options 40x15
RetroBIOS: Options
@@ -620,7 +620,7 @@
Sets --region
Start Open B Back Left/Right Set
Start Open B Back <> Set
=== options 80x24
RetroBIOS: Options
@@ -658,7 +658,7 @@
[ ] Japan
Start Tick B Done Left/Right Order
Start Tick B Done <> Order
=== regions 40x15
RetroBIOS: Preferred regions
@@ -674,7 +674,7 @@
Start Tick B Done Left/Right Order
Start Tick B Done <> Order
=== regions 80x24
RetroBIOS: Preferred regions
@@ -1032,8 +1032,8 @@
-2] Name or service not known
Address:
https://raw.githubusercontent.com/
Abdess/retrobios/main/install/
retroarch.json
1-5 of 7
> Choose another setup or folder
Quit
Start Choose B Back
+1 -1
View File
@@ -9,4 +9,4 @@
BIOS folder:
/home/user/.config/retroarch/system
ES-DE found: its BIOS files go to each
A/Enter Continue B/Esc Quit ? Help
A Continue B Quit ? Help
+1 -1
View File
@@ -12,4 +12,4 @@
emulator, not to ES-DE itself.
A/Enter Continue B/Esc Quit ? Help
A Continue B Quit ? Help
+3 -3
View File
@@ -3,9 +3,9 @@
All
None
Filter (/ to type)
> [x] nintendo-gba (gba) 1 file, 16.0 KB
[x] sony-playstation 3 files, 1.0 MB
[ ] nintendo-famicom-disk (ファミコン) in place
> [x] nintendo-gba (gba) 1 file, 16.0 KB
[x] sony-playstation 3 files, 1.0 MB
[ ] nintendo-famicom-disk (ファミコン) in place
+139 -9
View File
@@ -1013,7 +1013,7 @@ class Views(unittest.TestCase):
with self.subTest(screen=name):
hint = install.tui_view(state, 40, 15)[-1].strip()
self.assertTrue(hint.startswith(("A/Enter", "A ", "Enter", "Ctrl-C", "Any key",
"B/Esc Stop")), hint)
"B/Esc Stop", "B Stop")), hint)
def test_focus_is_marked_without_colour(self):
lines = install.tui_view(fresh_state(), 80, 24)
@@ -1030,12 +1030,12 @@ def _bar_keys(line: str) -> set:
# The keys each route has, as the bar may name them. "Any" opens "Any key
# closes this help", <> and ^v are the narrow forms of Left/Right, Up/Down.
ROUTE_KEYS = {
"keys": {"Enter", "Esc", "Space", "o", "?", "/", "Ctrl-C", "Ctrl-U"},
"gptokeyb": {"A", "B", "X", "Y", "Select+Start"},
"gptokeyb_muxterm": {"A", "B", "X", "Y", "Select+Start"},
"evmapy": {"A", "B", "X", "Y"},
"muxterm": {"Start", "B", "Y", "Menu", "Select"},
"miyoo": {"A", "Start", "R2", "L2"},
"keys": {"Enter", "Esc", "Space", "o", "?", "/", "Ctrl-C", "Ctrl-U", "PgUp/PgDn"},
"gptokeyb": {"A", "B", "X", "Y", "Select+Start", "L1/R1"},
"gptokeyb_muxterm": {"A", "B", "X", "Y", "Select+Start", "D-pad"},
"evmapy": {"A", "B", "X", "Y", "L1/R1"},
"muxterm": {"Start", "B", "Y", "Menu", "Select", "D-pad"},
"miyoo": {"A", "Start", "R2", "L2", "L1/R1"},
}
EVERY_ROUTE_HAS = {"Left/Right", "Up/Down", "<>", "^v", "Any"}
@@ -1628,7 +1628,11 @@ class AuditRoundTwo(unittest.TestCase):
kind, plat, title, lines, code = inbox.get_nowait()
self.assertEqual((kind, title, code), ("manifest_failed", "No connection", 1))
self.assertIn("could not be downloaded: the server refused the connection", lines[0])
self.assertNotIn("--", " ".join(lines))
# The pack is the one option named: the way of a handheld with no
# Wi-Fi (tui_audit_11 P3-3).
self.assertIn("Or copy a pack to the card and run the installer with --from-pack",
" ".join(lines))
self.assertNotIn("--", " ".join(lines).replace("--from-pack", ""))
state = fresh_state()
with mock.patch.object(install.Path, "exists", return_value=True):
press(state, "enter")
@@ -5803,7 +5807,8 @@ class AuditSix(unittest.TestCase):
self.assertNotIn("before Install", text)
self.assertNotIn("backup folder", text)
self.assertIn("Copy them from your old card", text)
self.assertEqual(view[-1].strip(), "A/Enter Back ? Help")
# The short names at 40 columns, as every screen of that width.
self.assertEqual(view[-1].strip(), "A Back ? Help")
def test_a_refusal_shows_at_40x12_on_type_a_path(self):
"""P2-2: Enter seemed to do nothing, the refusal drawn below the
@@ -9072,6 +9077,131 @@ class AuditEighteenAndEleven(unittest.TestCase):
rows = install.tui_rows(state)
self.assertEqual(rows[state.focus.get("plan", 0)].action, "fromcard")
# tui_audit_11 P3-2 to P3-20: the screens' polish.
def test_a_long_message_scrolls_with_its_position(self):
"""P3-2: at 40x12 the offline screen dropped its remedy unsaid."""
state = fresh_state()
state.stack = ["error"]
state.error_title = install.TUI_OFFLINE_TITLE
state.error = ["This run makes no network request (--offline), and the list of BIOS "
"files comes from the network.",
"Run the installer again with the list saved as a file (--manifest "
"FILE, a copy of install/<platform>.json) or with a pack (--from-pack "
"PACK), or without --offline."]
state.cols, state.rows = 40, 12
view = [str(line) for line in install.tui_view(state, 40, 12)]
self.assertTrue(any(re.fullmatch(r" 1-\d+ of \d+", line) for line in view), view)
self.assertIn("Scroll", view[-1])
press(state, "pgdn")
end = " ".join(" ".join(str(line) for line in install.tui_view(state, 40, 12)).split())
self.assertIn("--offline.", end)
def test_a_small_window_says_why_the_questions_come_line_by_line(self):
"""P3-4."""
with mock.patch.object(install, "tui_blocker",
return_value="the terminal is 39x12, smaller than 40x12"), \
mock.patch.object(install, "_run", side_effect=SystemExit(0)), \
mock.patch.object(install, "detect_os", return_value="linux"), \
mock.patch.dict(install._WSL), \
mock.patch.object(sys, "argv", ["install.py"]), \
contextlib.redirect_stdout(io.StringIO()) as out, \
self.assertRaises(SystemExit):
install.main()
self.assertIn("The window is 39x12: questions come line by line (40x12 for the full "
"screen).", out.getvalue())
def test_one_bar_rule_per_width(self):
"""P3-5: at 40 columns the plan read "A Install", Confirm "A/Enter"."""
states = golden_states()
for name in ("preview", "confirm", "result", "quit"):
with self.subTest(screen=name):
bar = str(install.tui_view(states[name], 40, 12)[-1])
self.assertNotIn("A/Enter", bar)
self.assertNotIn("B/Esc", bar)
def test_the_folder_its_config_named_is_said_under_it(self):
"""P3-6, P3-7."""
state = checked_state()
long_dest = Path("/home/user/" + "a-long-folder-name/" * 5 + "system")
state.dest = long_dest
with mock.patch.object(install, "_retroarch_config_at",
return_value=(HOME / ".config/retroarch/retroarch.cfg", HOME)):
lines = [str(line).strip() for line in install.tui_view(state, 80, 30)]
at = next(index for index, line in enumerate(lines) if line.startswith("BIOS folder:"))
tail = next(index for index, line in enumerate(lines) if line.startswith("Named by"))
self.assertNotIn("...", " ".join(lines[at:tail]))
self.assertIn(str(long_dest).replace("/home/user", "~")[-20:], " ".join(lines[at:tail]))
self.assertLessEqual(tail - at, 3)
def test_the_help_while_typing_lists_what_does_not_type(self):
"""P3-9."""
state = checked_state()
state.stack.append("systems")
state.editing = "systems"
state.help = True
help_text = " ".join(" ".join(install.tui_view(state, 80, 24)).split())
self.assertIn("Esc Clear the filter", help_text)
self.assertIn("Ctrl-U Clear", help_text)
self.assertNotIn("Tick, untick", help_text)
def test_the_plan_names_core_and_region_as_line_mode(self):
"""P3-11."""
state = checked_state()
state.cli_systems, state.cores, state.regions = ["sony-playstation"], ["x"], ["us"]
text = " ".join(" ".join(install.tui_view(state, 120, 40)).split())
self.assertIn("(--system), --core, --region.", text)
def test_pc_and_short_prefixes_find_the_computer_setups(self):
"""P3-17."""
for typed in ("pc", "wi", "win"):
with self.subTest(typed=typed):
found = {row.value for row in install.setup_list([], set(), typed, "linux")
if row.action == "platform"}
self.assertIn("retrobat", found)
def test_a_partial_result_counts_once_then_says_the_remedy(self):
"""P3-18."""
state = _installed_state(Path("/x/system"))
state.summary.update(installed=6, pending=16, failed=[])
state.from_folders = [Path("/media/me/OLD")]
with mock.patch.object(install, "_offline_only", return_value=True), \
mock.patch.object(install, "_tui_sources",
return_value="6 files copied from OLD, 16 still missing."):
_title, lines = install.tui_outcome(state)
self.assertEqual(lines[0], "6 files copied from OLD, 16 still missing.")
self.assertIn("They are not in", lines[1])
def test_q_is_said_as_a_quit(self):
"""P3-19: q reported "stopped", the word of an interrupted run."""
state = checked_state()
press(state, "q")
self.assertEqual(state.exit_code, 130)
self.assertEqual(install._closing_lines(state),
["RetroBIOS: quit. Nothing was installed."])
other = checked_state()
install.tui_interrupt(other)
self.assertEqual(install._closing_lines(other),
["RetroBIOS: stopped. Nothing was installed."])
def test_wide_rows_keep_the_size_near_the_name(self):
"""P3-20."""
row = install.TuiRow("system", "[x] 3DO 3do", "2 files, 4.9 KB")
line = str(install._row_line(row, False, 118))
self.assertLessEqual(len(line.rstrip()), install.TUI_ROW_SPREAD)
def test_the_wsl_browser_titles_a_drive_by_its_letter(self):
"""P3-13."""
state = fresh_state()
state.stack = ["browse"]
state.browse_dir = Path("/mnt/e")
with mock.patch.dict(install._WSL, {"active": True, "root": "/mnt"}), \
mock.patch.object(install, "_browse_rows", return_value=([], "")):
state.browse_rows = []
title = " ".join(str(line) for line in install.tui_view(state, 80, 24)[:4])
self.assertIn("E:\\", title)
self.assertNotIn("/mnt/e", title)
def test_the_card_marker_table_is_written_from_the_rules(self):
"""code_audit_18 P3-6, tui_audit_11 P2-2: the table left out the
SHARE drives. It is generated: every card rule and SHARE drive file