aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/rebuild_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-03-20 11:00:08 +0100
committerBjørn Erik Pedersen <[email protected]>2024-03-20 12:33:05 +0100
commit19937a20adcce473300445a0013c99c0d1f6d916 (patch)
tree942fcf76b2d5ab238749d4a7cbed01aa7fb0f916 /hugolib/rebuild_test.go
parentc1ea22a232add4c6f371b4278dd3089f102ac15c (diff)
downloadhugo-19937a20adcce473300445a0013c99c0d1f6d916.tar.gz
hugo-19937a20adcce473300445a0013c99c0d1f6d916.zip
Fix rebuild when changing mixed case named templates
Fixes #12165
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 f3b10cf18..f2717644d 100644
--- a/hugolib/rebuild_test.go
+++ b/hugolib/rebuild_test.go
@@ -1490,3 +1490,27 @@ title: "Default"
// Just make sure that it doesn't panic.
b.EditFileReplaceAll("archetypes/default.md", "Default", "Default Edited").Build()
}
+
+func TestRebuildEditMixedCaseTemplateFileIssue12165(t *testing.T) {
+ t.Parallel()
+
+ files := `
+-- hugo.toml --
+baseURL = "https://example.com"
+disableLiveReload = true
+-- layouts/partials/MyTemplate.html --
+MyTemplate
+-- layouts/index.html --
+MyTemplate: {{ partial "MyTemplate.html" . }}|
+
+
+`
+
+ b := TestRunning(t, files)
+
+ b.AssertFileContent("public/index.html", "MyTemplate: MyTemplate")
+
+ b.EditFileReplaceAll("layouts/partials/MyTemplate.html", "MyTemplate", "MyTemplate Edited").Build()
+
+ b.AssertFileContent("public/index.html", "MyTemplate: MyTemplate Edited")
+}