mirror of
https://github.com/golang/go
synced 2024-11-20 09:04:44 -07:00
xml: fix typo in test.
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4218042
This commit is contained in:
parent
c1fdb6f156
commit
1a6b1dd0de
@ -13,16 +13,16 @@ import (
|
|||||||
|
|
||||||
func TestUnmarshalFeed(t *testing.T) {
|
func TestUnmarshalFeed(t *testing.T) {
|
||||||
var f Feed
|
var f Feed
|
||||||
if err := Unmarshal(StringReader(rssFeedString), &f); err != nil {
|
if err := Unmarshal(StringReader(atomFeedString), &f); err != nil {
|
||||||
t.Fatalf("Unmarshal: %s", err)
|
t.Fatalf("Unmarshal: %s", err)
|
||||||
}
|
}
|
||||||
if !reflect.DeepEqual(f, rssFeed) {
|
if !reflect.DeepEqual(f, atomFeed) {
|
||||||
t.Fatalf("have %#v\nwant %#v", f, rssFeed)
|
t.Fatalf("have %#v\nwant %#v", f, atomFeed)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// hget http://codereview.appspot.com/rss/mine/rsc
|
// hget http://codereview.appspot.com/rss/mine/rsc
|
||||||
const rssFeedString = `
|
const atomFeedString = `
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us"><title>Code Review - My issues</title><link href="http://codereview.appspot.com/" rel="alternate"></link><li-nk href="http://codereview.appspot.com/rss/mine/rsc" rel="self"></li-nk><id>http://codereview.appspot.com/</id><updated>2009-10-04T01:35:58+00:00</updated><author><name>rietveld<></name></author><entry><title>rietveld: an attempt at pubsubhubbub
|
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us"><title>Code Review - My issues</title><link href="http://codereview.appspot.com/" rel="alternate"></link><li-nk href="http://codereview.appspot.com/rss/mine/rsc" rel="self"></li-nk><id>http://codereview.appspot.com/</id><updated>2009-10-04T01:35:58+00:00</updated><author><name>rietveld<></name></author><entry><title>rietveld: an attempt at pubsubhubbub
|
||||||
</title><link hre-f="http://codereview.appspot.com/126085" rel="alternate"></link><updated>2009-10-04T01:35:58+00:00</updated><author><name>email-address-removed</name></author><id>urn:md5:134d9179c41f806be79b3a5f7877d19a</id><summary type="html">
|
</title><link hre-f="http://codereview.appspot.com/126085" rel="alternate"></link><updated>2009-10-04T01:35:58+00:00</updated><author><name>email-address-removed</name></author><id>urn:md5:134d9179c41f806be79b3a5f7877d19a</id><summary type="html">
|
||||||
@ -115,7 +115,7 @@ type Text struct {
|
|||||||
|
|
||||||
type Time string
|
type Time string
|
||||||
|
|
||||||
var rssFeed = Feed{
|
var atomFeed = Feed{
|
||||||
XMLName: Name{"http://www.w3.org/2005/Atom", "feed"},
|
XMLName: Name{"http://www.w3.org/2005/Atom", "feed"},
|
||||||
Title: "Code Review - My issues",
|
Title: "Code Review - My issues",
|
||||||
Link: []Link{
|
Link: []Link{
|
||||||
|
Loading…
Reference in New Issue
Block a user