aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/rebuild_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-02-16 13:41:59 +0100
committerBjørn Erik Pedersen <[email protected]>2024-02-16 16:17:57 +0100
commitf1491c900e83adbf009a0db8497791aeb9bd6357 (patch)
tree506d1f6638c33e7f7a8ffc84c6b0d438bc421853 /hugolib/rebuild_test.go
parent639073e4fee8fd4235c1002b076e110fad4c82f2 (diff)
downloadhugo-f1491c900e83adbf009a0db8497791aeb9bd6357.tar.gz
hugo-f1491c900e83adbf009a0db8497791aeb9bd6357.zip
Fix i18n rebuild regression
Fixes #12039
Diffstat (limited to 'hugolib/rebuild_test.go')
-rw-r--r--hugolib/rebuild_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/hugolib/rebuild_test.go b/hugolib/rebuild_test.go
index 9b15fc3e2..06a6083f5 100644
--- a/hugolib/rebuild_test.go
+++ b/hugolib/rebuild_test.go
@@ -1149,6 +1149,28 @@ Single.
b.AssertFileContent("public/index.html", "Home.", "<style>body {\n\tbackground: blue;\n}</style>")
}
+func TestRebuildI18n(t *testing.T) {
+ t.Parallel()
+
+ files := `
+-- hugo.toml --
+baseURL = "https://example.com"
+disableLiveReload = true
+-- i18n/en.toml --
+hello = "Hello"
+-- layouts/index.html --
+Hello: {{ i18n "hello" }}
+`
+
+ b := TestRunning(t, files)
+
+ b.AssertFileContent("public/index.html", "Hello: Hello")
+
+ b.EditFileReplaceAll("i18n/en.toml", "Hello", "Hugo").Build()
+
+ b.AssertFileContent("public/index.html", "Hello: Hugo")
+}
+
func TestRebuildVariationsAssetsSassImport(t *testing.T) {
if !htesting.IsCI() {
t.Skip("skip CI only")