mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-18 01:13:30 -05:00
fix: separate message parts with a colon
This commit is contained in:
1 parent
0136d8a240
commit
de8e7ff02e
5 files changed
+31
-15
No files matched your search
@@ -2084,7 +2084,7 @@ class ACheckThatCannotAnswerDoesNotPass(unittest.TestCase):
|
||||
encoding="utf-8"
|
||||
)
|
||||
self.assertIn(
|
||||
'if report.get("error"):',
|
||||
'if report.get("error") or pending(report):',
|
||||
source.split("def main(")[-1],
|
||||
"main() ignores the error the report carries",
|
||||
)
|
||||
@@ -3426,5 +3426,21 @@ class AutoFetchAsksVerifyWhatIsMissing(unittest.TestCase):
|
||||
self.assertEqual(names, ["gone.bin", "bad.bin", "diabdat.mpq"])
|
||||
|
||||
|
||||
|
||||
class MessagesSeparateWithAColon(unittest.TestCase):
|
||||
"""Em-dashes were replaced by " -" in messages: "bios/BLOOD.RFF -raze
|
||||
says size mismatch" reads as a flag glued to a file name."""
|
||||
|
||||
PATTERN = re.compile(r"\} -[{a-z]")
|
||||
|
||||
def test_no_message_uses_a_dash_separator(self):
|
||||
found = []
|
||||
for path in [ROOT / "install.py", *sorted((ROOT / "scripts").rglob("*.py"))]:
|
||||
for number, line in enumerate(path.read_text().splitlines(), 1):
|
||||
if self.PATTERN.search(line):
|
||||
found.append(f"{path.name}:{number}: {line.strip()}")
|
||||
self.assertEqual(found, [])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -472,7 +472,7 @@ class OneProfileSelector(unittest.TestCase):
|
||||
f"{name} must ask common, not re-derive the refusal",
|
||||
)
|
||||
self.assertNotIn(
|
||||
'is a launcher -use the emulator it launches', text,
|
||||
'is a launcher: use the emulator it launches', text,
|
||||
f"{name} still spells the refusal itself",
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user