(self)
| 56 | assert "^p-1-" in text |
| 57 | |
| 58 | def test_anchor_format(self): |
| 59 | text, blocks = add_anchors("# Title\n\nBody.\n") |
| 60 | # heading 锚点格式 h-{level}-{seq}-{hash6} |
| 61 | import re |
| 62 | h_anchors = re.findall(r"\^(h-\d+-\d+-[a-z0-9]{6})", text) |
| 63 | assert len(h_anchors) == 1 |
| 64 | p_anchors = re.findall(r"\^(p-\d+-[a-z0-9]{6})", text) |
| 65 | assert len(p_anchors) == 1 |
| 66 | |
| 67 | def test_idempotence_content_unchanged(self): |
| 68 | """跑两次必须输出相同文本(最关键的不变量)。""" |
nothing calls this directly
no test coverage detected