mirror of
https://github.com/nkanaev/yarr.git
synced 2025-09-14 02:10:04 +00:00
parser fixes
This commit is contained in:
@@ -77,3 +77,18 @@ func TestParse(t *testing.T) {
|
||||
t.Fatal("invalid content")
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseShortFeed(t *testing.T) {
|
||||
have, err := Parse(strings.NewReader(
|
||||
`<?xml version="1.0"?><feed xmlns="http://www.w3.org/2005/Atom"></feed>`,
|
||||
))
|
||||
want := &Feed{}
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !reflect.DeepEqual(want, have) {
|
||||
t.Logf("want: %#v", want)
|
||||
t.Logf("have: %#v", have)
|
||||
t.FailNow()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user