Remove unused helpers and incidental assertions

This commit is contained in:
2026-11-02 03:34:59 +00:00
parent 1d40fb7ac0
commit d9c97fd915
6 changed files with 5 additions and 111 deletions

View File

@@ -87,7 +87,7 @@ func TestParseMarkdownHeadingAnchors(t *testing.T) {
}
}
func TestMarkdownCacheSharesParsedDocumentsByBlobObjectID(t *testing.T) {
func TestMarkdownDocumentsParseIdenticalAndDistinctBlobs(t *testing.T) {
repository := newTreeRepository(t)
shared := []byte("# Guide\n[other](other.md \"title\")\n")
writeTreeFile(t, repository, "one/guide.md", shared)
@@ -111,20 +111,17 @@ func TestMarkdownCacheSharesParsedDocumentsByBlobObjectID(t *testing.T) {
if err != nil {
t.Fatal(err)
}
if first != second {
t.Fatal("identical Markdown blobs returned different parsed documents")
}
other, err := cache.document(context.Background(), "one/other.md")
if err != nil {
t.Fatal(err)
}
if other == first {
t.Fatal("different Markdown blobs shared a parsed document")
}
if _, ok := other.anchors["other"]; !ok {
t.Fatalf("other document anchors = %#v", other.anchors)
}
if got := first.links[0]; got.Destination != "other.md" || got.Title != "title" || got.Location.Line != 2 {
t.Fatalf("shared Markdown link = %#v, want content-relative destination, title, and location", got)
}
if got := second.links[0]; got.Destination != "other.md" || got.Title != "title" || got.Location.Line != 2 {
t.Fatalf("second Markdown link = %#v, want content-relative destination, title, and location", got)
}
}