summaryrefslogtreecommitdiffstats
path: root/hugolib/rebuild_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/rebuild_test.go')
-rw-r--r--hugolib/rebuild_test.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/hugolib/rebuild_test.go b/hugolib/rebuild_test.go
index 54d6888c0..98a8d0949 100644
--- a/hugolib/rebuild_test.go
+++ b/hugolib/rebuild_test.go
@@ -305,6 +305,29 @@ Pages: {{ range .RegularPages }}{{ .RelPermalink }}|{{ end }}$
b.AssertFileContent("public/index.html", "Pages: /p1/|/p2/|$")
}
+func TestRebuildAddPageWithSpaceListPagesInHome(t *testing.T) {
+ files := `
+-- hugo.toml --
+baseURL = "https://example.com"
+disableLiveReload = true
+-- content/asection/s1.md --
+-- content/p1.md --
+---
+title: "P1"
+weight: 1
+---
+-- layouts/_default/single.html --
+Single: {{ .Title }}|{{ .Content }}|
+-- layouts/index.html --
+Pages: {{ range .RegularPages }}{{ .RelPermalink }}|{{ end }}$
+`
+
+ b := TestRunning(t, files)
+ b.AssertFileContent("public/index.html", "Pages: /p1/|$")
+ b.AddFiles("content/test test/index.md", ``).Build()
+ b.AssertFileContent("public/index.html", "Pages: /p1/|/test-test/|$")
+}
+
func TestRebuildScopedToOutputFormat(t *testing.T) {
files := `
-- hugo.toml --