mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-19 16:17:49 -06:00
fix: name a served sha1 only when it differs
A RomM row printed the served copy's sha1 under the same SHA1 it had just declared, 313 times on the page. The note stays where the copy is not one the row declares.
This commit is contained in:
1 parent
da5f24b74a
commit
21b8d902e3
2 files changed
+12
-4
No files matched your search
@@ -152,6 +152,11 @@ class EachEntryNamesItsFile(unittest.TestCase):
|
||||
self.assertRegex(served, rf"\]\(\.\./systems/[^)]+\.md#sha1-{digest[:12]}\)")
|
||||
self.assertTrue(served.startswith("Served by: "))
|
||||
self.assertIn(f"`{digest[:8]}`", served)
|
||||
# The row already shows the declared sha1: repeating it said nothing.
|
||||
quiet = generate_site._served_line({"status": "ok", "path": path}, f"aaaa, {digest.upper()}")
|
||||
self.assertNotIn(digest[:8], quiet.split(")", 1)[1])
|
||||
self.assertIn(f"`{digest[:8]}`", generate_site._served_line(
|
||||
{"status": "ok", "path": path}, "a" * 40))
|
||||
self.assertEqual(generate_site._served_line({"status": "missing"}), "Not held")
|
||||
self.assertTrue(generate_site._served_line(
|
||||
{"status": "untested", "path": path}).startswith("Held, not the declared hash"))
|
||||
|
||||
Reference in new issue
Block a user