summaryrefslogtreecommitdiffstats
path: root/hugolib/config_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-05-20 15:04:22 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-05-20 17:45:56 +0200
commit7c7baa618325cb3d2b1ef48bdc1f97aae25f62e9 (patch)
treef80cd6e57e2f9dcb07ceae3e7c022f41d4076bfe /hugolib/config_test.go
parent4f085e80da9a415725db3def70e5ce847cf06741 (diff)
Add hugo.WorkingDir
Fixes #10969
Diffstat (limited to 'hugolib/config_test.go')
-rw-r--r--hugolib/config_test.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/hugolib/config_test.go b/hugolib/config_test.go
index 24275025c..4af9b7998 100644
--- a/hugolib/config_test.go
+++ b/hugolib/config_test.go
@@ -898,6 +898,29 @@ mainSections: []
}
+func TestConfigHugoWorkingDir(t *testing.T) {
+ t.Parallel()
+
+ files := `
+-- hugo.toml --
+-- layouts/index.html --
+WorkingDir: {{ hugo.WorkingDir }}|
+
+`
+ b := NewIntegrationTestBuilder(
+ IntegrationTestConfig{
+ T: t,
+ TxtarString: files,
+ WorkingDir: "myworkingdir",
+ },
+ ).Build()
+
+ b.AssertFileContent("public/index.html", `
+WorkingDir: myworkingdir|
+`)
+
+}
+
func TestConfigMergeLanguageDeepEmptyLefSide(t *testing.T) {
t.Parallel()