From 3bfb19098c69a6b810a2a4e478f4184420bf4200 Mon Sep 17 00:00:00 2001 From: demo Date: Sun, 10 May 2026 22:47:08 -0400 Subject: feat: resolve hrefs according to a base URL --- internal/links/find_test.go | 56 --------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 internal/links/find_test.go (limited to 'internal/links/find_test.go') diff --git a/internal/links/find_test.go b/internal/links/find_test.go deleted file mode 100644 index e0866a5..0000000 --- a/internal/links/find_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package links - -import ( - "fmt" - "strings" - "testing" -) - -type exampleType struct { - expectedCount int - content string -} - -var examples = []exampleType{ - {2, ` -c - - Ex 1 - - - Example Page - Posts - - -`}, - - {4, ` - - Ex 2 - - - Example Page - Posts - A rouge link! - - -`}, -} - -func TestFindCountHrefs(t *testing.T) { - for i, ex := range examples { - name := fmt.Sprintf("Example %d", i+1) - - t.Run(name, func(t *testing.T) { - r := strings.NewReader(ex.content) - hrefs, err := parse(r) - if err != nil { - t.Error(err) - } - - if actualCount := len(hrefs); actualCount != ex.expectedCount { - t.Errorf("got %d, want %d", actualCount, ex.expectedCount) - } - }) - } -} -- cgit v1.2.3