diff --git a/tests/test_doc_pages.py b/tests/test_doc_pages.py index 0a3939f78..c29301dde 100644 --- a/tests/test_doc_pages.py +++ b/tests/test_doc_pages.py @@ -1922,6 +1922,26 @@ class TheInstallerSamplesTravelWithTheManifests(unittest.TestCase): self.assertTrue(any(autorun.path_matches(p, path) for p in patterns)) +class TheRemovalProofsAreTheExportersOwn(unittest.TestCase): + """tools.md listed the proofs that keep an entry out of + removal_candidates without the platform's launcher records, which + candidates.py checks right after a path.""" + + WORDS = {"path": "`path:`", "launcher": "`launchers:`", "name": "by name or alias", + "hash": "by any hash", "directory": "`type: directory`", + "data_directory": "a data directory"} + + def test_the_page_names_each_proof_in_order(self): + from exporter.candidates import _PROOF_ORDER # noqa: PLC0415 + + page = (WIKI / "tools.md").read_text(encoding="utf-8") + start = page.index("No entry the platform declares is removed.") + section = page[start:page.index("removal_candidates", start)] + self.assertEqual(set(self.WORDS), set(_PROOF_ORDER)) + positions = [section.index(self.WORDS[kind]) for kind in _PROOF_ORDER] + self.assertEqual(positions, sorted(positions)) + + class APlatformListIsDescribedNotJudged(unittest.TestCase): """adding-a-platform opened on files a platform's own list "leaves out", read first by the maintainer of that platform: "does not name" says the diff --git a/wiki/tools.md b/wiki/tools.md index c74739572..b40e67136 100644 --- a/wiki/tools.md +++ b/wiki/tools.md @@ -359,9 +359,11 @@ test reads the original and the updated System.dat and es_bios.xml back to check that the list is the diff. No entry the platform declares is removed. One the truth does not pair is -looked for in the profiles of every core the platform runs: by name or -alias, by the basename or tail of a `path:`, by any hash (archive members -included), under a `type: directory` entry or a data directory. An entry +looked for, in this order: by the tail of a `path:` in the profiles of every +core the platform runs, by a name the platform's own launch code reads (its +`launchers:` records, such as the 22 names Batocera's DuckStation generator +tries), then in those profiles by name or alias, by any hash (archive +members included), under a `type: directory` entry or a data directory. An entry none of them answers is written to `exports/.json` under `removal_candidates`, with the cores examined for its system and a reason. The verdict is `undetermined` when a core the platform names has no