diff --git a/scripts/generate_site.py b/scripts/generate_site.py index 8ccb3123..bd6bd434 100644 --- a/scripts/generate_site.py +++ b/scripts/generate_site.py @@ -1622,13 +1622,18 @@ def _render_platform_systems( destination = str(cfg_entry.get("destination") or "") where = f" at `{destination}`" if destination and destination != fname else "" lines.append(f"{pad}- `{fname}`{where} - {', '.join(details)}") - # Show full hashes on a sub-line (useful for copy-paste) - if sha1 or md5: + # Every hash the platform declares, whole: the crc32 is what + # System.dat and clrmamepro print, and pasting it found nothing + # for a pinned file the collection holds under other bytes. + crc32 = str(cfg_entry.get("crc32") or "") + if sha1 or md5 or crc32: hash_parts = [] if sha1: hash_parts.append(f"SHA1: `{sha1}`") if md5: hash_parts.append(f"MD5: `{md5}`") + if crc32: + hash_parts.append(f"CRC32: `{crc32}`") lines.append(f"{pad} {' | '.join(hash_parts)}") lines.append("") diff --git a/tests/test_site_validation.py b/tests/test_site_validation.py index ab125691..6e9b079d 100644 --- a/tests/test_site_validation.py +++ b/tests/test_site_validation.py @@ -242,5 +242,17 @@ class TheHomeTitleSaysWhatTheSiteIs(unittest.TestCase): self.assertIn("BIOS", title) + +class PlatformPagesPrintTheDeclaredCrc32(unittest.TestCase): + """System.dat pins aes.zip by crc32 91e93107; the RetroArch page printed + only its sha1 and md5, so the crc a clrmamepro user pastes found nothing.""" + + def test_the_rendered_page(self): + page = ROOT / "docs" / "platforms" / "retroarch.md" + if not page.is_file(): + self.skipTest("site not generated") + self.assertIn("CRC32: `91e93107`", page.read_text(encoding="utf-8")) + + if __name__ == "__main__": unittest.main()