summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/config_test.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/hugolib/config_test.go b/hugolib/config_test.go
index 1baaf7196..994734ce6 100644
--- a/hugolib/config_test.go
+++ b/hugolib/config_test.go
@@ -871,3 +871,29 @@ Param: svParamValue
`)
}
+
+func TestConfigEmptyMainSections(t *testing.T) {
+ t.Parallel()
+
+ files := `
+-- hugo.yml --
+params:
+ mainSections:
+-- content/mysection/_index.md --
+-- content/mysection/mycontent.md --
+-- layouts/index.html --
+mainSections: {{ site.Params.mainSections }}
+
+`
+ b := NewIntegrationTestBuilder(
+ IntegrationTestConfig{
+ T: t,
+ TxtarString: files,
+ },
+ ).Build()
+
+ b.AssertFileContent("public/index.html", `
+mainSections: []
+`)
+
+}