aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader/parser/parser_test.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2019-02-28 21:22:58 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2019-02-28 21:23:33 -0800
commit6764a420b0b135e55bcf885eb4bd2031bf5f7604 (patch)
tree1cad46f3d35441ce85282a515424caa7d2fff1f7 /reader/parser/parser_test.go
parent45df254fe74ec42d426b00b1dcfb9a274bca08dd (diff)
Make parser compatible with Go 1.12
See changes in strings.Map(): https://golang.org/doc/go1.12#strings
Diffstat (limited to 'reader/parser/parser_test.go')
-rw-r--r--reader/parser/parser_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/reader/parser/parser_test.go b/reader/parser/parser_test.go
index b7a93c5..a5a79a9 100644
--- a/reader/parser/parser_test.go
+++ b/reader/parser/parser_test.go
@@ -187,7 +187,10 @@ func TestDifferentEncodingWithResponse(t *testing.T) {
}
r := &client.Response{Body: bytes.NewReader(content), ContentType: tc.contentType}
- r.EnsureUnicodeBody()
+ if encodingErr := r.EnsureUnicodeBody(); encodingErr != nil {
+ t.Fatalf(`Encoding error for %q: %v`, tc.filename, encodingErr)
+ }
+
feed, parseErr := ParseFeed(r.String())
if parseErr != nil {
t.Fatalf(`Parsing error for %q - %q: %v`, tc.filename, tc.contentType, parseErr)