aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/site_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2017-05-25 12:32:02 +0300
committerBjørn Erik Pedersen <[email protected]>2017-05-26 10:42:45 +0300
commite0c2e798201f75ae6e9a81a7442355288c2d141b (patch)
tree407d8f75a550280d6e5b016034d1a00f6ab4d0a4 /hugolib/site_test.go
parent87203139c38e0b992c96d7b8a23c7730649c68e5 (diff)
downloadhugo-e0c2e798201f75ae6e9a81a7442355288c2d141b.tar.gz
hugo-e0c2e798201f75ae6e9a81a7442355288c2d141b.zip
hugolib: Support regular pages in .Site.GetPage
Fixes #2844
Diffstat (limited to 'hugolib/site_test.go')
-rw-r--r--hugolib/site_test.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/hugolib/site_test.go b/hugolib/site_test.go
index bf5f9d547..3868055e9 100644
--- a/hugolib/site_test.go
+++ b/hugolib/site_test.go
@@ -1105,33 +1105,3 @@ func TestSourceRelativeLinkFileing(t *testing.T) {
}
}
}
-
-func BenchmarkGetPage(b *testing.B) {
- var (
- cfg, fs = newTestCfg()
- )
-
- for i := 0; i < 10; i++ {
- for j := 0; j < 100; j++ {
- writeSource(b, fs, filepath.Join("content", fmt.Sprintf("sect%d", i), fmt.Sprintf("page%d.md", j)), "CONTENT")
- }
- }
-
- s := buildSingleSite(b, deps.DepsCfg{Fs: fs, Cfg: cfg}, BuildCfg{SkipRender: true})
-
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- home := s.getPage(KindHome)
- if home == nil {
- b.Fatal("Home is nil")
- }
-
- for i := 0; i < 10; i++ {
- sect := fmt.Sprintf("sect%d", i)
- p := s.getPage(KindSection, sect)
- if p == nil {
- b.Fatal(fmt.Sprintf("Section %q is nil", sect))
- }
- }
- }
-}