fix: cite the reader that accepts the hash

A platform entry that declares a hash is now answered by the profile entries accepting it. Batocera's scph1001.bin (md5 dc2b9bf8, v2.0) cited DuckStation's bios.cpp:36, the v2.2 line. A same-named entry is kept, marked by name, only when none accepts the hash and its own hashes do not contradict it. Categories are unchanged: verify --all prints the same report.
This commit is contained in:
Abdessamad Derraz committed 2026-10-23 02:58:43 +02:00
1 parent 72e7507ff9
commit 14a6518d49
2 files changed
+53 -6

No files matched your search

+3 -1
View File
@@ -88,9 +88,11 @@ class Evidence(unittest.TestCase):
def test_game_data_names_its_reader_and_reference(self):
found = self.cats.explain({"name": "diabdat.mpq"}, "ports/diablo/diabdat.mpq", "diablo")
self.assertEqual(found["category"], GAME_DATA)
# The platform entry declares no hash: the reader is matched by name.
self.assertEqual(found["read_by"], [{
"emulator": "devilutionx", "proof": "name", "runs_system": True,
"entries": [{"name": "diabdat.mpq", "source_ref": "Source/init.cpp:120"}]}])
"entries": [{"name": "diabdat.mpq", "source_ref": "Source/init.cpp:120",
"by": "name"}]}])
self.assertEqual(verify.category_evidence_text(found),
"read by devilutionx (diabdat.mpq at Source/init.cpp:120)")