fix: every core ticked while none narrows the run

Cores drew every box empty when no core narrows the run, read as nothing
chosen. Every core is now drawn ticked, an untick keeps the others, All
and None work as on Choose systems, and the plan, Options and line mode
say all cores or N of M cores. A run with failures counts once, the
failed files said as failed.
This commit is contained in:
Abdessamad Derraz committed 2026-10-28 16:51:14 +01:00
1 parent a4faf536dd
commit ea214d9c01
25 files changed
+424 -272

No files matched your search

+7 -7
View File
@@ -494,7 +494,7 @@
^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Preferred regions^[[0m
Tick the regions to keep, best first. Where a system has one BIOS per region, the best one found
is installed.
is installed. With none ticked, every region's BIOS is kept.
^[[0;7;35m > [1] North America^[[0m
[ ] Japan
@@ -534,9 +534,12 @@
=== cores
^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Cores^[[0m
Tick the cores you use. With none ticked, every core's files are kept.
Every core ticked keeps every core's files. Untick the cores you do not use: the platform's own
files are always kept.
^[[0;7;35m > Filter (/ to type)^[[0m
^[[0;7;35m > All^[[0m
None
Filter (/ to type)
[ ] mesen
[x] pcsx_rearmed
@@ -568,10 +571,7 @@
^[[0;1;35mA/Enter^[[0m Filter ^[[0;2mB/Esc^[[0m Back ^[[0;2mX/Space^[[0m Tick ^[[0;2m?^[[0m Help
^[[0;1;35mA/Enter^[[0m Tick all ^[[0;2mB/Esc^[[0m Back ^[[0;2mX/Space^[[0m Tick ^[[0;2m?^[[0m Help
=== preview
^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Preview^[[0m
+10 -10
View File
@@ -160,26 +160,26 @@
Tick the regions to keep, best first.
Where a system has one BIOS per
region, the best one found is
installed.
installed. With none ticked, every
region's BIOS is kept.
^[[0;7;35m > [1] North America^[[0m
[ ] Japan
^[[0;1;35mA^[[0m Tick ^[[0;2mB^[[0m Done ^[[0;2m<>^[[0m Order ^[[0;2m?^[[0m Help
=== cores
^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Cores^[[0m
Tick the cores you use. With none
ticked, every core's files are kept.
^[[0;7;35m > Filter (/ to type)^[[0m
Every core ticked keeps every core's
files. Untick the cores you do not
use: the platform's own files are
always kept.
^[[0;7;35m > All^[[0m
None
Filter (/ to type)
[ ] mesen
[x] pcsx_rearmed
^[[0;1;35mA^[[0m Filter ^[[0;2mB^[[0m Back ^[[0;2mX^[[0m Tick ^[[0;2m?^[[0m Help
^[[0;1;35mA^[[0m Tick all ^[[0;2mB^[[0m Back ^[[0;2mX^[[0m Tick ^[[0;2m?^[[0m Help
=== preview
^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Preview^[[0m
+10 -10
View File
@@ -196,7 +196,8 @@
Tick the regions to keep, best first.
Where a system has one BIOS per
region, the best one found is
installed.
installed. With none ticked, every
region's BIOS is kept.
^[[0;7;35m > [1] North America^[[0m
[ ] Japan
@@ -204,24 +205,23 @@
^[[0;1;35mA^[[0m Tick ^[[0;2mB^[[0m Done ^[[0;2m<>^[[0m Order ^[[0;2m?^[[0m Help
=== cores
^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Cores^[[0m
Tick the cores you use. With none
ticked, every core's files are kept.
Every core ticked keeps every core's
files. Untick the cores you do not
use: the platform's own files are
always kept.
^[[0;7;35m > Filter (/ to type)^[[0m
^[[0;7;35m > All^[[0m
None
Filter (/ to type)
[ ] mesen
[x] pcsx_rearmed
^[[0;1;35mA^[[0m Filter ^[[0;2mB^[[0m Back ^[[0;2mX^[[0m Tick ^[[0;2m?^[[0m Help
^[[0;1;35mA^[[0m Tick all ^[[0;2mB^[[0m Back ^[[0;2mX^[[0m Tick ^[[0;2m?^[[0m Help
=== preview
^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Preview^[[0m
+8 -8
View File
@@ -302,7 +302,8 @@
^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Preferred regions^[[0m
Tick the regions to keep, best first. Where a system has one BIOS per region,
the best one found is installed.
the best one found is installed. With none ticked, every region's BIOS is
kept.
^[[0;7;35m > [1] North America^[[0m
[ ] Japan
@@ -321,14 +322,16 @@
^[[0;1;35mA/Enter^[[0m Tick ^[[0;2mB/Esc^[[0m Done ^[[0;2mLeft/Right^[[0m Order ^[[0;2m?^[[0m Help
=== cores
^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Cores^[[0m
Tick the cores you use. With none ticked, every core's files are kept.
Every core ticked keeps every core's files. Untick the cores you do not use:
the platform's own files are always kept.
^[[0;7;35m > Filter (/ to type)^[[0m
^[[0;7;35m > All^[[0m
None
Filter (/ to type)
[ ] mesen
[x] pcsx_rearmed
@@ -344,10 +347,7 @@
^[[0;1;35mA/Enter^[[0m Filter ^[[0;2mB/Esc^[[0m Back ^[[0;2mX/Space^[[0m Tick ^[[0;2m?^[[0m Help
^[[0;1;35mA/Enter^[[0m Tick all ^[[0;2mB/Esc^[[0m Back ^[[0;2mX/Space^[[0m Tick ^[[0;2m?^[[0m Help
=== preview
^[[0;1m ^[[0;1;35mRetroBIOS^[[0;1m: Preview^[[0m
+6 -6
View File
@@ -1,8 +1,11 @@
RetroBIOS: Cores
Tick the cores you use. With none ticked, every core's files are kept.
Every core ticked keeps every core's files. Untick the cores you do not use: the platform's own
files are always kept.
> Filter (/ to type)
> All
None
Filter (/ to type)
[ ] mesen
[x] pcsx_rearmed
@@ -34,7 +37,4 @@
A/Enter Filter B/Esc Back X/Space Tick ? Help
A/Enter Tick all B/Esc Back X/Space Tick ? Help
+8 -8
View File
@@ -1,12 +1,12 @@
RetroBIOS: Cores
Tick the cores you use. With none
ticked, every core's files are kept.
> Filter (/ to type)
Every core ticked keeps every core's
files. Untick the cores you do not
use: the platform's own files are
always kept.
> All
None
Filter (/ to type)
[ ] mesen
[x] pcsx_rearmed
A Filter B Back X Tick ? Help
A Tick all B Back X Tick ? Help
+8 -8
View File
@@ -1,15 +1,15 @@
RetroBIOS: Cores
Tick the cores you use. With none
ticked, every core's files are kept.
Every core ticked keeps every core's
files. Untick the cores you do not
use: the platform's own files are
always kept.
> Filter (/ to type)
> All
None
Filter (/ to type)
[ ] mesen
[x] pcsx_rearmed
A Filter B Back X Tick ? Help
A Tick all B Back X Tick ? Help
+6 -6
View File
@@ -1,8 +1,11 @@
RetroBIOS: Cores
Tick the cores you use. With none ticked, every core's files are kept.
Every core ticked keeps every core's files. Untick the cores you do not use:
the platform's own files are always kept.
> Filter (/ to type)
> All
None
Filter (/ to type)
[ ] mesen
[x] pcsx_rearmed
@@ -18,7 +21,4 @@
A/Enter Filter B/Esc Back X/Space Tick ? Help
A/Enter Tick all B/Esc Back X/Space Tick ? Help
+1 -1
View File
@@ -1,7 +1,7 @@
RetroBIOS: Preferred regions
Tick the regions to keep, best first. Where a system has one BIOS per region, the best one found
is installed.
is installed. With none ticked, every region's BIOS is kept.
> [1] North America
[ ] Japan
+2 -2
View File
@@ -3,10 +3,10 @@
Tick the regions to keep, best first.
Where a system has one BIOS per
region, the best one found is
installed.
installed. With none ticked, every
region's BIOS is kept.
> [1] North America
[ ] Japan
A Tick B Done <> Order ? Help
+2 -2
View File
@@ -3,7 +3,8 @@
Tick the regions to keep, best first.
Where a system has one BIOS per
region, the best one found is
installed.
installed. With none ticked, every
region's BIOS is kept.
> [1] North America
[ ] Japan
@@ -11,5 +12,4 @@
A Tick B Done <> Order ? Help
+2 -2
View File
@@ -1,7 +1,8 @@
RetroBIOS: Preferred regions
Tick the regions to keep, best first. Where a system has one BIOS per region,
the best one found is installed.
the best one found is installed. With none ticked, every region's BIOS is
kept.
> [1] North America
[ ] Japan
@@ -20,5 +21,4 @@
A/Enter Tick B/Esc Done Left/Right Order ? Help
+28 -28
View File
@@ -623,12 +623,12 @@
Tick the regions to keep, best first.
Where a system has one BIOS per
region, the best one found is
installed.
installed. With none ticked, every
region's BIOS is kept.
> [1] North America
[ ] Japan
A Tick B Done <> Order
=== regions 40x15
RetroBIOS: Preferred regions
@@ -636,7 +636,8 @@
Tick the regions to keep, best first.
Where a system has one BIOS per
region, the best one found is
installed.
installed. With none ticked, every
region's BIOS is kept.
> [1] North America
[ ] Japan
@@ -644,13 +645,13 @@
A Tick B Done <> Order
=== regions 80x24
RetroBIOS: Preferred regions
Tick the regions to keep, best first. Where a system has one BIOS per region,
the best one found is installed.
the best one found is installed. With none ticked, every region's BIOS is
kept.
> [1] North America
[ ] Japan
@@ -669,43 +670,45 @@
A Tick B Done Left/Right Order
=== cores 40x12
RetroBIOS: Cores
Tick the cores you use. With none
ticked, every core's files are kept.
> Filter (with a keyboard)
Every core ticked keeps every core's
files. Untick the cores you do not
use: the platform's own files are
always kept.
> All
None
Filter (with a keyboard)
[ ] mesen
[x] pcsx_rearmed
A Filter B Back X Tick
A Tick all B Back X Tick
=== cores 40x15
RetroBIOS: Cores
Tick the cores you use. With none
ticked, every core's files are kept.
Every core ticked keeps every core's
files. Untick the cores you do not
use: the platform's own files are
always kept.
> Filter (with a keyboard)
> All
None
Filter (with a keyboard)
[ ] mesen
[x] pcsx_rearmed
A Filter B Back X Tick
A Tick all B Back X Tick
=== cores 80x24
RetroBIOS: Cores
Tick the cores you use. With none ticked, every core's files are kept.
Every core ticked keeps every core's files. Untick the cores you do not use:
the platform's own files are always kept.
> Filter (with a keyboard)
> All
None
Filter (with a keyboard)
[ ] mesen
[x] pcsx_rearmed
@@ -721,10 +724,7 @@
A Filter B Back X Tick
A Tick all B Back X Tick
=== preview 80x24
RetroBIOS: Preview
+28 -28
View File
@@ -623,12 +623,12 @@
Tick the regions to keep, best first.
Where a system has one BIOS per
region, the best one found is
installed.
installed. With none ticked, every
region's BIOS is kept.
> [1] North America
[ ] Japan
A Tick B Done <> Order
=== regions 40x15
RetroBIOS: Preferred regions
@@ -636,7 +636,8 @@
Tick the regions to keep, best first.
Where a system has one BIOS per
region, the best one found is
installed.
installed. With none ticked, every
region's BIOS is kept.
> [1] North America
[ ] Japan
@@ -644,13 +645,13 @@
A Tick B Done <> Order
=== regions 80x24
RetroBIOS: Preferred regions
Tick the regions to keep, best first. Where a system has one BIOS per region,
the best one found is installed.
the best one found is installed. With none ticked, every region's BIOS is
kept.
> [1] North America
[ ] Japan
@@ -669,43 +670,45 @@
A Tick B Done Left/Right Order
=== cores 40x12
RetroBIOS: Cores
Tick the cores you use. With none
ticked, every core's files are kept.
> Filter (with a keyboard)
Every core ticked keeps every core's
files. Untick the cores you do not
use: the platform's own files are
always kept.
> All
None
Filter (with a keyboard)
[ ] mesen
[x] pcsx_rearmed
A Filter B Back X Tick
A Tick all B Back X Tick
=== cores 40x15
RetroBIOS: Cores
Tick the cores you use. With none
ticked, every core's files are kept.
Every core ticked keeps every core's
files. Untick the cores you do not
use: the platform's own files are
always kept.
> Filter (with a keyboard)
> All
None
Filter (with a keyboard)
[ ] mesen
[x] pcsx_rearmed
A Filter B Back X Tick
A Tick all B Back X Tick
=== cores 80x24
RetroBIOS: Cores
Tick the cores you use. With none ticked, every core's files are kept.
Every core ticked keeps every core's files. Untick the cores you do not use:
the platform's own files are always kept.
> Filter (with a keyboard)
> All
None
Filter (with a keyboard)
[ ] mesen
[x] pcsx_rearmed
@@ -721,10 +724,7 @@
A Filter B Back X Tick
A Tick all B Back X Tick
=== preview 80x24
RetroBIOS: Preview
+28 -28
View File
@@ -623,12 +623,12 @@
Tick the regions to keep, best first.
Where a system has one BIOS per
region, the best one found is
installed.
installed. With none ticked, every
region's BIOS is kept.
> [1] North America
[ ] Japan
A Tick B Done <> Order
=== regions 40x15
RetroBIOS: Preferred regions
@@ -636,7 +636,8 @@
Tick the regions to keep, best first.
Where a system has one BIOS per
region, the best one found is
installed.
installed. With none ticked, every
region's BIOS is kept.
> [1] North America
[ ] Japan
@@ -644,13 +645,13 @@
A Tick B Done <> Order
=== regions 80x24
RetroBIOS: Preferred regions
Tick the regions to keep, best first. Where a system has one BIOS per region,
the best one found is installed.
the best one found is installed. With none ticked, every region's BIOS is
kept.
> [1] North America
[ ] Japan
@@ -669,43 +670,45 @@
A Tick B Done Left/Right Order
=== cores 40x12
RetroBIOS: Cores
Tick the cores you use. With none
ticked, every core's files are kept.
> Filter (with a keyboard)
Every core ticked keeps every core's
files. Untick the cores you do not
use: the platform's own files are
always kept.
> All
None
Filter (with a keyboard)
[ ] mesen
[x] pcsx_rearmed
A Filter B Back X Tick
A Tick all B Back X Tick
=== cores 40x15
RetroBIOS: Cores
Tick the cores you use. With none
ticked, every core's files are kept.
Every core ticked keeps every core's
files. Untick the cores you do not
use: the platform's own files are
always kept.
> Filter (with a keyboard)
> All
None
Filter (with a keyboard)
[ ] mesen
[x] pcsx_rearmed
A Filter B Back X Tick
A Tick all B Back X Tick
=== cores 80x24
RetroBIOS: Cores
Tick the cores you use. With none ticked, every core's files are kept.
Every core ticked keeps every core's files. Untick the cores you do not use:
the platform's own files are always kept.
> Filter (with a keyboard)
> All
None
Filter (with a keyboard)
[ ] mesen
[x] pcsx_rearmed
@@ -721,10 +724,7 @@
A Filter B Back X Tick
A Tick all B Back X Tick
=== preview 80x24
RetroBIOS: Preview
+28 -28
View File
@@ -598,12 +598,12 @@
Tick the regions to keep, best first.
Where a system has one BIOS per
region, the best one found is
installed.
installed. With none ticked, every
region's BIOS is kept.
> [1] North America
[ ] Japan
Enter Tick Esc Done <> Order ? Help
=== regions 40x15
RetroBIOS: Preferred regions
@@ -611,7 +611,8 @@
Tick the regions to keep, best first.
Where a system has one BIOS per
region, the best one found is
installed.
installed. With none ticked, every
region's BIOS is kept.
> [1] North America
[ ] Japan
@@ -619,13 +620,13 @@
Enter Tick Esc Done <> Order ? Help
=== regions 80x24
RetroBIOS: Preferred regions
Tick the regions to keep, best first. Where a system has one BIOS per region,
the best one found is installed.
the best one found is installed. With none ticked, every region's BIOS is
kept.
> [1] North America
[ ] Japan
@@ -644,43 +645,45 @@
Enter Tick Esc Done Left/Right Order ? Help
=== cores 40x12
RetroBIOS: Cores
Tick the cores you use. With none
ticked, every core's files are kept.
> Filter (/ to type)
Every core ticked keeps every core's
files. Untick the cores you do not
use: the platform's own files are
always kept.
> All
None
Filter (/ to type)
[ ] mesen
[x] pcsx_rearmed
Enter Filter Esc Back Space Tick
Enter Tick all Esc Back Space Tick
=== cores 40x15
RetroBIOS: Cores
Tick the cores you use. With none
ticked, every core's files are kept.
Every core ticked keeps every core's
files. Untick the cores you do not
use: the platform's own files are
always kept.
> Filter (/ to type)
> All
None
Filter (/ to type)
[ ] mesen
[x] pcsx_rearmed
Enter Filter Esc Back Space Tick
Enter Tick all Esc Back Space Tick
=== cores 80x24
RetroBIOS: Cores
Tick the cores you use. With none ticked, every core's files are kept.
Every core ticked keeps every core's files. Untick the cores you do not use:
the platform's own files are always kept.
> Filter (/ to type)
> All
None
Filter (/ to type)
[ ] mesen
[x] pcsx_rearmed
@@ -696,10 +699,7 @@
Enter Filter Esc Back Space Tick ? Help
Enter Tick all Esc Back Space Tick ? Help
=== preview 40x12
RetroBIOS: Preview
+28 -28
View File
@@ -652,12 +652,12 @@
Tick the regions to keep, best first.
Where a system has one BIOS per
region, the best one found is
installed.
installed. With none ticked, every
region's BIOS is kept.
> [1] North America
[ ] Japan
A Tick R2 Done <> Order
=== regions 40x15
RetroBIOS: Preferred regions
@@ -665,7 +665,8 @@
Tick the regions to keep, best first.
Where a system has one BIOS per
region, the best one found is
installed.
installed. With none ticked, every
region's BIOS is kept.
> [1] North America
[ ] Japan
@@ -673,13 +674,13 @@
A Tick R2 Done <> Order
=== regions 80x24
RetroBIOS: Preferred regions
Tick the regions to keep, best first. Where a system has one BIOS per region,
the best one found is installed.
the best one found is installed. With none ticked, every region's BIOS is
kept.
> [1] North America
[ ] Japan
@@ -698,43 +699,45 @@
A Tick R2 Done Left/Right Order
=== cores 40x12
RetroBIOS: Cores
Tick the cores you use. With none
ticked, every core's files are kept.
> Filter (with a keyboard)
Every core ticked keeps every core's
files. Untick the cores you do not
use: the platform's own files are
always kept.
> All
None
Filter (with a keyboard)
[ ] mesen
[x] pcsx_rearmed
A Filter R2 Back
A Tick all R2 Back
=== cores 40x15
RetroBIOS: Cores
Tick the cores you use. With none
ticked, every core's files are kept.
Every core ticked keeps every core's
files. Untick the cores you do not
use: the platform's own files are
always kept.
> Filter (with a keyboard)
> All
None
Filter (with a keyboard)
[ ] mesen
[x] pcsx_rearmed
A Filter R2 Back
A Tick all R2 Back
=== cores 80x24
RetroBIOS: Cores
Tick the cores you use. With none ticked, every core's files are kept.
Every core ticked keeps every core's files. Untick the cores you do not use:
the platform's own files are always kept.
> Filter (with a keyboard)
> All
None
Filter (with a keyboard)
[ ] mesen
[x] pcsx_rearmed
@@ -750,10 +753,7 @@
A Filter R2 Back
A Tick all R2 Back
=== preview 80x24
RetroBIOS: Preview
+28 -28
View File
@@ -652,12 +652,12 @@
Tick the regions to keep, best first.
Where a system has one BIOS per
region, the best one found is
installed.
installed. With none ticked, every
region's BIOS is kept.
> [1] North America
[ ] Japan
Start Tick B Done <> Order
=== regions 40x15
RetroBIOS: Preferred regions
@@ -665,7 +665,8 @@
Tick the regions to keep, best first.
Where a system has one BIOS per
region, the best one found is
installed.
installed. With none ticked, every
region's BIOS is kept.
> [1] North America
[ ] Japan
@@ -673,13 +674,13 @@
Start Tick B Done <> Order
=== regions 80x24
RetroBIOS: Preferred regions
Tick the regions to keep, best first. Where a system has one BIOS per region,
the best one found is installed.
the best one found is installed. With none ticked, every region's BIOS is
kept.
> [1] North America
[ ] Japan
@@ -698,43 +699,45 @@
Start Tick B Done Left/Right Order
=== cores 40x12
RetroBIOS: Cores
Tick the cores you use. With none
ticked, every core's files are kept.
> Filter (Select shows a keyboard)
Every core ticked keeps every core's
files. Untick the cores you do not
use: the platform's own files are
always kept.
> All
None
Filter (Select shows a keyboard)
[ ] mesen
[x] pcsx_rearmed
Start Filter B Back Y Tick
Start Tick all B Back Y Tick
=== cores 40x15
RetroBIOS: Cores
Tick the cores you use. With none
ticked, every core's files are kept.
Every core ticked keeps every core's
files. Untick the cores you do not
use: the platform's own files are
always kept.
> Filter (Select shows a keyboard)
> All
None
Filter (Select shows a keyboard)
[ ] mesen
[x] pcsx_rearmed
Start Filter B Back Y Tick
Start Tick all B Back Y Tick
=== cores 80x24
RetroBIOS: Cores
Tick the cores you use. With none ticked, every core's files are kept.
Every core ticked keeps every core's files. Untick the cores you do not use:
the platform's own files are always kept.
> Filter (Select shows a keyboard)
> All
None
Filter (Select shows a keyboard)
[ ] mesen
[x] pcsx_rearmed
@@ -750,10 +753,7 @@
Start Filter B Back Y Tick
Start Tick all B Back Y Tick
=== preview 40x12
RetroBIOS: Preview
+2 -2
View File
@@ -148,7 +148,7 @@ class CopyFromAnOldCard(FromFolder):
proc = self.install()
self.assertEqual(proc.returncode, 1, proc.stdout + proc.stderr)
self.assertEqual(self.installed(), {"scph5500.bin": JP, "pcsx/extra.bin": EXTRA})
self.assertIn(f"2 files copied from {self.old}, 2 still missing.", proc.stdout)
self.assertIn(f"2 files copied from {self.old}, 2 failed.", proc.stdout)
def test_a_link_out_of_the_folder_is_not_followed(self):
outside = self.root / "elsewhere"
@@ -196,7 +196,7 @@ class CopyFromAnOldCard(FromFolder):
(repo.root / "bios" / "mgba_extra.bin").unlink()
proc = repo.run("--from", str(old), "--no-input")
self.assertEqual(proc.returncode, 1, proc.stdout + proc.stderr)
self.assertIn(f"2 files copied from {old}, 2 downloaded, 1 still missing.",
self.assertIn(f"2 files copied from {old}, 2 downloaded, 1 failed.",
proc.stdout)
self.assertEqual(sorted(repo.installed()), sorted(
name for name in payloads if name != "mgba/extra.bin"))
+83 -6
View File
@@ -527,18 +527,20 @@ class Flow(unittest.TestCase):
state.focus["options"] = 3
press(state, "enter")
self.assertEqual(state.screen, "cores")
self.assertEqual([row.value for row in install.tui_rows(state)][1:],
self.assertEqual([row.value for row in install.tui_rows(state)][3:],
["mesen", "pcsx_rearmed"])
self.assertEqual(install.tui_rows(state)[state.focus["cores"]].value, "mesen")
# Every core ticked while none narrows the run: one untick keeps
# the others, ticked back it is every core again.
press(state, " ")
self.assertEqual(state.cores, ["mesen"])
press(state, "left")
self.assertEqual(state.cores, ["pcsx_rearmed"])
press(state, "right")
self.assertEqual(state.cores, [])
press(state, "/", "p", "c")
self.assertEqual([row.value for row in install.tui_rows(state)][1:], ["pcsx_rearmed"])
press(state, "enter", "right", "enter")
self.assertEqual([row.value for row in install.tui_rows(state)][3:], ["pcsx_rearmed"])
press(state, "enter", "left", "enter")
self.assertEqual(state.screen, "options")
self.assertEqual(install.tui_flags(state), [("--core", "pcsx_rearmed")])
self.assertEqual(install.tui_flags(state), [("--core", "mesen")])
def test_preview_is_a_dry_run(self):
state = checked_state()
@@ -13855,6 +13857,81 @@ class AuditTwentyThreeAndSixteen(unittest.TestCase):
self.assertIn("reads its BIOS files", small)
self.assertIn(folder[-12:], small)
# The owner's note: Cores drew every box empty when no core narrows the
# run, read as "nothing is ticked, tick them all".
def cores_screen(self, **given) -> install.TuiState:
state = checked_state()
state.cores = list(given.get("cores", []))
state.cli_cores = list(state.cores)
press(state, "o")
state.focus["options"] = next(index for index, row in enumerate(
install.tui_rows(state)) if row.action == "cores")
press(state, "enter")
self.assertEqual(state.screen, "cores")
return state
@staticmethod
def boxes(state: install.TuiState) -> dict:
return {row.value: row.label[:3] for row in install.tui_rows(state)
if row.action == "core"}
def test_cores_open_every_one_ticked(self):
state = self.cores_screen()
self.assertEqual(self.boxes(state), {"mesen": "[x]", "pcsx_rearmed": "[x]"})
self.assertEqual(install.tui_rows(state)[state.focus["cores"]].value, "mesen")
self.assertEqual(install.tui_flags(state), [])
def test_one_untick_narrows_to_the_others(self):
state = self.cores_screen()
press(state, " ")
self.assertEqual(self.boxes(state), {"mesen": "[ ]", "pcsx_rearmed": "[x]"})
self.assertEqual(install.tui_flags(state), [("--core", "pcsx_rearmed")])
press(state, " ")
self.assertEqual(self.boxes(state), {"mesen": "[x]", "pcsx_rearmed": "[x]"})
self.assertEqual(state.cores, [])
press(state, " ", "enter")
self.assertEqual(state.screen, "options")
row = next(row for row in install.tui_rows(state) if row.action == "cores")
self.assertEqual(row.label, "Cores: 1 of 2")
state.stack = ["setup", "plan"]
self.assertIn("1 of 2 cores", " ".join(install.tui_view(state, 100, 30)))
def test_none_then_all_as_the_systems_list(self):
state = self.cores_screen()
rows = install.tui_rows(state)
state.focus["cores"] = next(i for i, row in enumerate(rows) if row.action == "none")
press(state, "enter")
self.assertEqual(self.boxes(state), {"mesen": "[ ]", "pcsx_rearmed": "[ ]"})
press(state, "enter")
self.assertEqual(state.screen, "cores")
self.assertIn("No core is ticked", str(state.status))
state.focus["cores"] = next(i for i, row in enumerate(rows) if row.action == "all")
press(state, "enter")
self.assertEqual(self.boxes(state), {"mesen": "[x]", "pcsx_rearmed": "[x]"})
self.assertEqual(install.tui_flags(state), [])
def test_core_ticks_only_the_cores_it_names(self):
state = self.cores_screen(cores=["pcsx_rearmed"])
self.assertEqual(self.boxes(state), {"mesen": "[ ]", "pcsx_rearmed": "[x]"})
state.stack = ["setup", "plan"]
self.assertIn("--core", " ".join(install.tui_view(state, 100, 30)))
def test_both_modes_count_the_cores_kept_alike(self):
listing = self.listing("retroarch", [
self.entry("a.bin", b"A" * 8, ["nintendo-gba"]),
self.entry("m.bin", b"M" * 8, ["nintendo-gba"], cores=["mgba"]),
self.entry("v.bin", b"V" * 8, ["nintendo-gba"], cores=["vba_next"]),
self.entry("p.bin", b"P" * 8, ["sony-playstation"])])
text, _asked = self.line_run(_args(manifest=listing, dest=self.here,
declared_only=False, dry_run=True),
["c", "", "2"])
self.assertIn("Every core's extra files are kept: Enter keeps them all", text)
head = text.rsplit("Counted again for your choices", 1)[1]
self.assertIn("1 of 2 cores", head)
self.assertEqual(install.cores_words(0, 2), "all cores")
self.assertEqual(install.cores_words(2, 2), "all cores")
# Root cause 6: the pages say what the installer shows.
def test_which_pack_names_the_first_screen(self):