diff options
Diffstat (limited to 'hugolib/config_test.go')
-rw-r--r-- | hugolib/config_test.go | 23 |
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() |