aboutsummaryrefslogtreecommitdiffhomepage
path: root/langs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-03-21 09:35:15 +0100
committerBjørn Erik Pedersen <[email protected]>2022-04-08 13:26:17 +0200
commitd070bdf10f14d233288f7318a4e9f7555f070a65 (patch)
treefff8d59f98bdab3027bb45c4e10ca88594332872 /langs
parentb08193971a821fc27e549a73120c15e5e5186775 (diff)
downloadhugo-d070bdf10f14d233288f7318a4e9f7555f070a65.tar.gz
hugo-d070bdf10f14d233288f7318a4e9f7555f070a65.zip
Rework the Destination filesystem to make --renderStaticToDisk work
See #9626
Diffstat (limited to 'langs')
-rw-r--r--langs/i18n/i18n_test.go11
-rw-r--r--langs/language_test.go7
2 files changed, 4 insertions, 14 deletions
diff --git a/langs/i18n/i18n_test.go b/langs/i18n/i18n_test.go
index b1ff748f4..0048d4b1b 100644
--- a/langs/i18n/i18n_test.go
+++ b/langs/i18n/i18n_test.go
@@ -500,16 +500,7 @@ func newDepsConfig(tp *TranslationProvider, cfg config.Provider, fs *hugofs.Fs)
}
func getConfig() config.Provider {
- v := config.New()
- v.Set("defaultContentLanguage", "en")
- v.Set("contentDir", "content")
- v.Set("dataDir", "data")
- v.Set("i18nDir", "i18n")
- v.Set("layoutDir", "layouts")
- v.Set("archetypeDir", "archetypes")
- v.Set("assetDir", "assets")
- v.Set("resourceDir", "resources")
- v.Set("publishDir", "public")
+ v := config.NewWithTestDefaults()
langs.LoadLanguageSettings(v, nil)
mod, err := modules.CreateProjectModule(v)
if err != nil {
diff --git a/langs/language_test.go b/langs/language_test.go
index 8557d781a..e6ef94824 100644
--- a/langs/language_test.go
+++ b/langs/language_test.go
@@ -16,14 +16,13 @@ package langs
import (
"testing"
- "github.com/gohugoio/hugo/config"
-
qt "github.com/frankban/quicktest"
+ "github.com/gohugoio/hugo/config"
)
func TestGetGlobalOnlySetting(t *testing.T) {
c := qt.New(t)
- v := config.New()
+ v := config.NewWithTestDefaults()
v.Set("defaultContentLanguageInSubdir", true)
v.Set("contentDir", "content")
v.Set("paginatePath", "page")
@@ -38,7 +37,7 @@ func TestGetGlobalOnlySetting(t *testing.T) {
func TestLanguageParams(t *testing.T) {
c := qt.New(t)
- v := config.New()
+ v := config.NewWithTestDefaults()
v.Set("p1", "p1cfg")
v.Set("contentDir", "content")