mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-11 12:33:53 -06:00
fix: read a wrapped BIOS folder line whole
A long checkout path wraps "BIOS folder:" after the label, and the test joined the lines without the space it dropped. It now compares without spaces, which holds for either wrap point.
This commit is contained in:
1 parent
a02d30f90c
commit
e4f8bb336a
1 file changed
+4
-2
@@ -11269,8 +11269,10 @@ class TapsGameDataAndExitCodes(_CardFixtures, unittest.TestCase):
|
||||
lines = [str(line).strip() for line in install.tui_view(state, 120, 40)]
|
||||
folder = next(i for i, line in enumerate(lines) if line.startswith("BIOS folder:"))
|
||||
named = next(i for i, line in enumerate(lines) if line.startswith("Named by"))
|
||||
# Nothing between the folder, wrapped or not, and what named it.
|
||||
self.assertEqual("".join(lines[folder:named]), f"BIOS folder: {state.dest}", lines)
|
||||
# Nothing between the folder, wrapped or not, and what named it. A
|
||||
# long path wraps after the label, a longer one inside the path.
|
||||
self.assertEqual("".join(lines[folder:named]).replace(" ", ""),
|
||||
f"BIOS folder: {state.dest}".replace(" ", ""), lines)
|
||||
self.assertLess(named, next(i for i, line in enumerate(lines)
|
||||
if line.startswith(("For ", "Copy them"))))
|
||||
|
||||
|
||||
Reference in new issue
Block a user