summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordemo <demo@antix1>2026-05-09 11:49:37 -0400
committerdemo <demo@antix1>2026-05-09 11:49:56 -0400
commitfa637da7792f72ae1b79c99ecbf9d44e965048c3 (patch)
tree5e14b09a11be9d844ce6119a6195d3d50297d063
parent52bb422959147384291dcfbfe5a6142d363862ab (diff)
test: add second example + only test Parse
I have more confidence that Parse works (and works better than FindLinks), so I'm sticking with it.
-rw-r--r--internal/test/findlinks_test.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/internal/test/findlinks_test.go b/internal/test/findlinks_test.go
index 37c6152..2704e20 100644
--- a/internal/test/findlinks_test.go
+++ b/internal/test/findlinks_test.go
@@ -38,10 +38,23 @@ func TestFindlinks(t *testing.T) {
},
},
},
+ {
+ "html/ex2.html",
+ []findlinks.Link{
+ {
+ Href: "https://www.twitter.com/joncalhoun",
+ Text: "Check me out on twitter",
+ },
+ {
+ Href: "https://github.com/gophercises",
+ Text: "Gophercises is on Github !",
+ },
+ },
+ },
}
for _, test := range tests {
- parsers := []parserFn{findlinks.FindLinks, findlinks.Parse}
+ parsers := []parserFn{findlinks.Parse}
for i, p := range parsers {
testName := fmt.Sprintf("Parser %d %s", i+1, test.filename)