aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/datafiles_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-04-08 15:15:26 +0200
committerBjørn Erik Pedersen <[email protected]>2022-04-10 13:49:31 +0200
commit30c2e54c25f6c3a942080f30be49712adda27586 (patch)
tree6805e432456f92623db0b1c862879cee54693481 /hugolib/datafiles_test.go
parent3117e5859509e909298153972ab6f700af577f92 (diff)
downloadhugo-30c2e54c25f6c3a942080f30be49712adda27586.tar.gz
hugo-30c2e54c25f6c3a942080f30be49712adda27586.zip
Replace all usage of CopyOnWriteFs with OverlayFs
Fixes #9761
Diffstat (limited to 'hugolib/datafiles_test.go')
-rw-r--r--hugolib/datafiles_test.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/hugolib/datafiles_test.go b/hugolib/datafiles_test.go
index 6cbe7bbc6..a6bcae944 100644
--- a/hugolib/datafiles_test.go
+++ b/hugolib/datafiles_test.go
@@ -27,6 +27,38 @@ import (
qt "github.com/frankban/quicktest"
)
+func TestDataFromTheme(t *testing.T) {
+ t.Parallel()
+
+ files := `
+-- config.toml --
+[module]
+[[module.imports]]
+path = "mytheme"
+-- data/a.toml --
+d1 = "d1main"
+d2 = "d2main"
+-- themes/mytheme/data/a.toml --
+d1 = "d1theme"
+d2 = "d2theme"
+d3 = "d3theme"
+-- layouts/index.html --
+d1: {{ site.Data.a.d1 }}|d2: {{ site.Data.a.d2 }}|d3: {{ site.Data.a.d3 }}
+
+`
+
+ b := NewIntegrationTestBuilder(
+ IntegrationTestConfig{
+ T: t,
+ TxtarString: files,
+ },
+ ).Build()
+
+ b.AssertFileContent("public/index.html", `
+d1: d1main|d2: d2main|d3: d3theme
+ `)
+}
+
func TestDataDir(t *testing.T) {
t.Parallel()
equivDataDirs := make([]dataDir, 3)