Skip to content

Commit 3103e8b

Browse files
committed
[red] Cover case-sensitive documentation links
Signed-off-by: Viwat Vchirawongkwin <viwat.v@chula.ac.th>
1 parent b3ed5ae commit 3103e8b

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎tests/publication/test_docs_links.py‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,21 @@ def test_rejects_a_missing_markdown_anchor(self) -> None:
5858
["README.md: missing anchor: #missing-heading"],
5959
)
6060

61+
def test_rejects_a_case_mismatched_target(self) -> None:
62+
with tempfile.TemporaryDirectory() as directory:
63+
root = Path(directory)
64+
(root / "docs").mkdir()
65+
(root / "docs" / "Guide.md").write_text("# Guide\n", encoding="utf-8")
66+
(root / "README.md").write_text(
67+
"[guide](docs/guide.md)\n",
68+
encoding="utf-8",
69+
)
70+
71+
self.assertEqual(
72+
find_broken_links(root),
73+
["README.md: target case mismatch: docs/guide.md"],
74+
)
75+
6176
def test_public_repository_links_are_valid(self) -> None:
6277
self.assertEqual(find_broken_links(REPO_ROOT), [])
6378

0 commit comments

Comments
 (0)