aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/rebuild_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-04-16 09:32:08 +0200
committerBjørn Erik Pedersen <[email protected]>2024-04-16 12:06:37 +0200
commitfa60a2fbc317aa3b1fcfcaf2e842bdb439b8e7f1 (patch)
tree901e4f0d595f5e22908af979f1b2894a0aea95eb /hugolib/rebuild_test.go
parentfe63de3a83da351fa9b31498486a2f6538a70bde (diff)
downloadhugo-fa60a2fbc317aa3b1fcfcaf2e842bdb439b8e7f1.tar.gz
hugo-fa60a2fbc317aa3b1fcfcaf2e842bdb439b8e7f1.zip
Fix server rebuilds when adding a content file on Linux
Fixes #12362
Diffstat (limited to 'hugolib/rebuild_test.go')
-rw-r--r--hugolib/rebuild_test.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/hugolib/rebuild_test.go b/hugolib/rebuild_test.go
index 23e3e0532..ea7efcb6f 100644
--- a/hugolib/rebuild_test.go
+++ b/hugolib/rebuild_test.go
@@ -1553,3 +1553,27 @@ Single: {{ .Title }}|{{ .Content }}|
b.AssertRenderCountPage(1)
b.AssertRenderCountContent(1)
}
+
+func TestRebuildEditSingleListChangeUbuntuIssue12362(t *testing.T) {
+ t.Parallel()
+
+ files := `
+-- hugo.toml --
+disableKinds = ['rss','section','sitemap','taxonomy','term']
+disableLiveReload = true
+-- layouts/_default/list.html --
+{{ range .Pages }}{{ .Title }}|{{ end }}
+-- layouts/_default/single.html --
+{{ .Title }}
+-- content/p1.md --
+---
+title: p1
+---
+`
+
+ b := TestRunning(t, files)
+ b.AssertFileContent("public/index.html", "p1|")
+
+ b.AddFiles("content/p2.md", "---\ntitle: p2\n---").Build()
+ b.AssertFileContent("public/index.html", "p1|p2|") // this test passes, which doesn't match reality
+}