aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/pagecollections_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/pagecollections_test.go')
-rw-r--r--hugolib/pagecollections_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/hugolib/pagecollections_test.go b/hugolib/pagecollections_test.go
index 8fd4f0739..eaa80a109 100644
--- a/hugolib/pagecollections_test.go
+++ b/hugolib/pagecollections_test.go
@@ -413,6 +413,10 @@ title: p2
func TestPageGetPageVariations(t *testing.T) {
files := `
-- hugo.toml --
+-- content/s1/_index.md --
+---
+title: s1 section
+---
-- content/s1/p1/index.md --
---
title: p1
@@ -430,6 +434,8 @@ title: p3
title: p2_root
---
-- layouts/index.html --
+/s1: {{ with .GetPage "/s1" }}{{ .Title }}{{ end }}|
+/s1/: {{ with .GetPage "/s1/" }}{{ .Title }}{{ end }}|
/s1/p2.md: {{ with .GetPage "/s1/p2.md" }}{{ .Title }}{{ end }}|
/s1/p2: {{ with .GetPage "/s1/p2" }}{{ .Title }}{{ end }}|
/s1/p1/index.md: {{ with .GetPage "/s1/p1/index.md" }}{{ .Title }}{{ end }}|
@@ -444,6 +450,8 @@ p1/index.md: {{ with .GetPage "p1/index.md" }}{{ .Title }}{{ end }}|
b := Test(t, files)
b.AssertFileContent("public/index.html", `
+/s1: s1 section|
+/s1/: s1 section|
/s1/p2.md: p2|
/s1/p2: p2|
/s1/p1/index.md: p1|