Flatten the unresolved comprehension; record that the citation test makes pointer rot visible

This commit was merged in pull request #27.
This commit is contained in:
2026-09-25 00:37:16 +02:00
parent 1c05fbc5da
commit 6be3efece2
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -21,5 +21,5 @@ class Citations(unittest.TestCase):
self.assertEqual([f"{path}: {stray}" for path, text in texts for stray in STRAY.findall(text)], [], 'spell a citation `CLAUDE.md` → "Vocabulary"')
cited = [(path, NAME.findall(run)) for path, text in texts for run in CITATION.findall(text)]
self.assertTrue(cited)
unresolved = [(path, name) for path, names in cited for name in [n for n in names[:1] if n not in headings] + [n for n in names[1:] if n not in leads]]
unresolved = [(path, name) for path, names in cited for i, name in enumerate(names) if name not in (headings if i == 0 else leads)]
self.assertEqual([f"{path}: {name}" for path, name in unresolved], [], "the first name is a heading of CLAUDE.md, each later one a heading or a bold lead")