1 parent b5fadb9 commit 13fe74fCopy full SHA for 13fe74f
1 file changed
tests/test_markdown_links.py
@@ -0,0 +1,28 @@
1
+#!/usr/bin/env python3
2
+"""Smoke test for repository-relative Markdown links."""
3
+from __future__ import annotations
4
+
5
+import subprocess
6
+import sys
7
+from pathlib import Path
8
9
+ROOT = Path(__file__).resolve().parents[1]
10
+CHECKER = ROOT / "scripts" / "check_markdown_links.py"
11
12
13
+def main() -> int:
14
+ result = subprocess.run(
15
+ [sys.executable, str(CHECKER)],
16
+ cwd=ROOT,
17
+ text=True,
18
+ capture_output=True,
19
+ check=False,
20
+ )
21
+ if result.returncode != 0:
22
+ raise AssertionError(f"Markdown link check failed:\n{result.stdout}\n{result.stderr}")
23
+ print("Markdown link smoke test passed")
24
+ return 0
25
26
27
+if __name__ == "__main__":
28
+ raise SystemExit(main())
0 commit comments