shouldwork

This commit is contained in:
2026-02-12 00:33:05 +03:00
parent 12b9af4c01
commit d5b8c8fd12
4 changed files with 19 additions and 5 deletions

View File

@@ -10,6 +10,13 @@ import (
const htmlStr = `<div><span id="test">Hello</span><span id="test">World</span></div>`
func Must[T any](v T, err error) T {
if err != nil {
panic(err)
}
return v
}
func TestSearchElem(t *testing.T) {
doc := Must(
html.Parse(strings.NewReader(htmlStr)),
@@ -60,7 +67,7 @@ func TestSearchElemAttr(t *testing.T) {
func TestCrawlTest(t *testing.T) {
fmt.Println(
crawlText(Must(
CrawlText(Must(
html.Parse(strings.NewReader(htmlStr)),
)),
)