func TestRFC1132(t *testing.T) { // if testing.Short() { // t.Skip("Skipping test in short mode.") // } xmlFeed := readXML("../feeds/example-rfc1132.xml") feed, err := poo.ParseXML(xmlFeed) if len(feed.Channel.Items) < 3 { t.Fail() } if err != nil { t.Error(err) } }
func TestWithString(t *testing.T) { if testing.Short() { t.Skip("Skipping test in short mode.") } xmlFeed := readXML("feeds/example-itunes_feed.xml") feed, err := poo.ParseXML(xmlFeed) if err != nil { t.Error(err) } if feed.Channel.Title != "All About Everything" { t.Log(fmt.Sprintf("%s doesn't match", feed.Channel.Title)) t.Fail() } }