diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-02-06 20:26:18 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-02-06 21:53:33 +0100 |
commit | a65622a13e2f20fc8746ccdc89cc6a731635a29e (patch) | |
tree | d27ce5609ee36688877d8dee521d91ca72034964 /hugolib/rebuild_test.go | |
parent | 146aedd7aa74654ead8afce01f63c0756bc31e71 (diff) | |
download | hugo-a65622a13e2f20fc8746ccdc89cc6a731635a29e.tar.gz hugo-a65622a13e2f20fc8746ccdc89cc6a731635a29e.zip |
Fix rebuild of changed bundled content files
Fixes #12000
Diffstat (limited to 'hugolib/rebuild_test.go')
-rw-r--r-- | hugolib/rebuild_test.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/hugolib/rebuild_test.go b/hugolib/rebuild_test.go index 74b04fe01..b1ebe14d5 100644 --- a/hugolib/rebuild_test.go +++ b/hugolib/rebuild_test.go @@ -39,7 +39,7 @@ My Section Bundle Text 2 Content. --- title: "My Section Bundle Content" --- -My Section Bundle Content. +My Section Bundle Content Content. -- content/mysection/_index.md -- --- title: "My Section" @@ -68,7 +68,7 @@ Foo. func TestRebuildEditTextFileInLeafBundle(t *testing.T) { b := TestRunning(t, rebuildFilesSimple) b.AssertFileContent("public/mysection/mysectionbundle/index.html", - "Resources: 0:/mysection/mysectionbundle/mysectionbundletext.txt|My Section Bundle Text 2 Content.|1:|<p>My Section Bundle Content.</p>\n|$") + "Resources: 0:/mysection/mysectionbundle/mysectionbundletext.txt|My Section Bundle Text 2 Content.|1:|<p>My Section Bundle Content Content.</p>\n|$") b.EditFileReplaceAll("content/mysection/mysectionbundle/mysectionbundletext.txt", "Content.", "Content Edited.").Build() b.AssertFileContent("public/mysection/mysectionbundle/index.html", @@ -109,6 +109,13 @@ func TestRebuildRenameTextFileInLeafBundle(t *testing.T) { b.AssertRenderCountContent(3) } +func TestRebuilEditContentFileInLeafBundle(t *testing.T) { + b := TestRunning(t, rebuildFilesSimple) + b.AssertFileContent("public/mysection/mysectionbundle/index.html", "My Section Bundle Content Content.") + b.EditFileReplaceAll("content/mysection/mysectionbundle/mysectionbundlecontent.md", "Content Content.", "Content Content Edited.").Build() + b.AssertFileContent("public/mysection/mysectionbundle/index.html", "My Section Bundle Content Content Edited.") +} + func TestRebuildRenameTextFileInBranchBundle(t *testing.T) { b := TestRunning(t, rebuildFilesSimple) b.AssertFileContent("public/mysection/index.html", "My Section") |