mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
parent
f8b40085cd
commit
d0f99cee1a
12 changed files with 68 additions and 36 deletions
|
@ -10,7 +10,7 @@ import (
|
|||
"testing"
|
||||
)
|
||||
|
||||
func TestUTF8WithIllegalCharacters(t *testing.T) {
|
||||
func TestXMLDocumentWithIllegalUnicodeCharacters(t *testing.T) {
|
||||
type myxml struct {
|
||||
XMLName xml.Name `xml:"rss"`
|
||||
Version string `xml:"version,attr"`
|
||||
|
@ -23,7 +23,7 @@ func TestUTF8WithIllegalCharacters(t *testing.T) {
|
|||
|
||||
var x myxml
|
||||
|
||||
decoder := NewDecoder(reader)
|
||||
decoder := NewXMLDecoder(reader)
|
||||
err := decoder.Decode(&x)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
|
@ -34,7 +34,7 @@ func TestUTF8WithIllegalCharacters(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestWindows251WithIllegalCharacters(t *testing.T) {
|
||||
func TestXMLDocumentWindows251EncodedWithIllegalCharacters(t *testing.T) {
|
||||
type myxml struct {
|
||||
XMLName xml.Name `xml:"rss"`
|
||||
Version string `xml:"version,attr"`
|
||||
|
@ -47,7 +47,7 @@ func TestWindows251WithIllegalCharacters(t *testing.T) {
|
|||
|
||||
var x myxml
|
||||
|
||||
decoder := NewDecoder(reader)
|
||||
decoder := NewXMLDecoder(reader)
|
||||
err := decoder.Decode(&x)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
|
@ -58,7 +58,7 @@ func TestWindows251WithIllegalCharacters(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestIllegalEncodingField(t *testing.T) {
|
||||
func TestXMLDocumentWithIncorrectEncodingField(t *testing.T) {
|
||||
type myxml struct {
|
||||
XMLName xml.Name `xml:"rss"`
|
||||
Version string `xml:"version,attr"`
|
||||
|
@ -71,7 +71,7 @@ func TestIllegalEncodingField(t *testing.T) {
|
|||
|
||||
var x myxml
|
||||
|
||||
decoder := NewDecoder(reader)
|
||||
decoder := NewXMLDecoder(reader)
|
||||
err := decoder.Decode(&x)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue