mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
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:
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user