From 0702241fa5d83da64be12431aa26cfd3f39a9bb7 Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Sat, 9 May 2026 17:26:15 +1200 Subject: [PATCH] Fix test expectations and handle Strip function return values in html2text tests --- internal/html2text/html2text_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/html2text/html2text_test.go b/internal/html2text/html2text_test.go index 96ca9a1..417d543 100644 --- a/internal/html2text/html2text_test.go +++ b/internal/html2text/html2text_test.go @@ -20,7 +20,7 @@ func TestPlain(t *testing.T) { tests[`

Heading

linked text.`] = "Heading linked text." for str, expected := range tests { - res := Strip(str, false) + res, _ := Strip(str, false) if res != expected { t.Log("error:", res, "!=", expected) t.Fail() @@ -42,12 +42,12 @@ func TestWithLinks(t *testing.T) { tests["

Heading

Paragraph

"] = "Heading Paragraph" tests[`

Heading

Paragraph

`] = "Heading Paragraph" - tests[`

Heading

linked text

`] = "Heading https://github.com linked text" + tests[`

Heading

linked text

`] = "Heading linked text https://github.com" // broken html - tests[`

Heading

linked text.`] = "Heading https://github.com linked text." + tests[`

Heading

linked text.`] = "Heading linked text. https://github.com" for str, expected := range tests { - res := Strip(str, true) + res, _ := Strip(str, true) if res != expected { t.Log("error:", res, "!=", expected) t.Fail()