Adding RSS test case.

Checks to make sure the xml document starts with <?xml.  Previously, the
html translate package would write additional details into the document
that caused it to fail.
This commit is contained in:
Noah Campbell
2013-11-05 05:29:37 +00:00
parent b22364570b
commit 1cebce12ad
3 changed files with 84 additions and 13 deletions

View File

@@ -348,19 +348,20 @@ date = "2012-01-01"
+++
Front Matter with Ordered Pages 4`)
var WEIGHTED_SOURCES = []source.ByteSource{
{"sect/doc1.md", WEIGHTED_PAGE_1, "sect"},
{"sect/doc2.md", WEIGHTED_PAGE_2, "sect"},
{"sect/doc3.md", WEIGHTED_PAGE_3, "sect"},
{"sect/doc4.md", WEIGHTED_PAGE_4, "sect"},
}
func TestOrderedPages(t *testing.T) {
files := make(map[string][]byte)
target := &target.InMemoryTarget{Files: files}
sources := []source.ByteSource{
{"sect/doc1.md", WEIGHTED_PAGE_1, "sect"},
{"sect/doc2.md", WEIGHTED_PAGE_2, "sect"},
{"sect/doc3.md", WEIGHTED_PAGE_3, "sect"},
{"sect/doc4.md", WEIGHTED_PAGE_4, "sect"},
}
s := &Site{
Target: target,
Config: Config{BaseUrl: "http://auth/bub/"},
Source: &source.InMemorySource{sources},
Source: &source.InMemorySource{WEIGHTED_SOURCES},
}
s.initializeSiteInfo()