diff options
Diffstat (limited to 'config/configProvider.go')
-rw-r--r-- | config/configProvider.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/config/configProvider.go b/config/configProvider.go index bc0dd950d..31914c38b 100644 --- a/config/configProvider.go +++ b/config/configProvider.go @@ -1,4 +1,4 @@ -// Copyright 2017-present The Hugo Authors. All rights reserved. +// Copyright 2019 The Hugo Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,3 +40,15 @@ func GetStringSlicePreserveString(cfg Provider, key string) []string { } return cast.ToStringSlice(sd) } + +// SetBaseTestDefaults provides some common config defaults used in tests. +func SetBaseTestDefaults(cfg Provider) { + cfg.Set("resourceDir", "resources") + cfg.Set("contentDir", "content") + cfg.Set("dataDir", "data") + cfg.Set("i18nDir", "i18n") + cfg.Set("layoutDir", "layouts") + cfg.Set("assetDir", "assets") + cfg.Set("archetypeDir", "archetypes") + cfg.Set("publishDir", "public") +} |