summaryrefslogtreecommitdiffstats
path: root/hugolib/config_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-10-29 16:22:35 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-10-30 09:41:04 +0100
commit8a1c637c4494751046142e0ef345fce38fc1431b (patch)
tree43847875b05e6261ca204c3c565fc84db7f63bde /hugolib/config_test.go
parent6d95dc9d74681cba53b46e79c6e1d58d27fcdfb0 (diff)
Fix setting HUGO_MODULE_PROXY etc. via env vars
Fixes #7903
Diffstat (limited to 'hugolib/config_test.go')
-rw-r--r--hugolib/config_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/hugolib/config_test.go b/hugolib/config_test.go
index a52e3f061..cb9c1d8f6 100644
--- a/hugolib/config_test.go
+++ b/hugolib/config_test.go
@@ -495,7 +495,6 @@ stringSlice = ["a", "b"]
[imaging]
anchor = "smart"
quality = 75
-resamplefilter = "CatmullRom"
`
b := newTestSitesBuilder(t).WithConfigFile("toml", baseConfig)
@@ -505,6 +504,7 @@ resamplefilter = "CatmullRom"
"HUGO_NEW", "new", // key not in config.toml
"HUGO_ENABLEGITINFO", "false",
"HUGO_IMAGING_ANCHOR", "top",
+ "HUGO_IMAGING_RESAMPLEFILTER", "CatmullRom",
"HUGO_STRINGSLICE", `["c", "d"]`,
"HUGO_INTSLICE", `[5, 8, 9]`,
"HUGO_FLOATSLICE", `[5.32]`,
@@ -519,6 +519,7 @@ resamplefilter = "CatmullRom"
c.Assert(cfg.Get("new"), qt.Equals, "new")
c.Assert(cfg.Get("imaging.anchor"), qt.Equals, "top")
c.Assert(cfg.Get("imaging.quality"), qt.Equals, int64(75))
+ c.Assert(cfg.Get("imaging.resamplefilter"), qt.Equals, "CatmullRom")
c.Assert(cfg.Get("stringSlice"), qt.DeepEquals, []interface{}{"c", "d"})
c.Assert(cfg.Get("floatSlice"), qt.DeepEquals, []interface{}{5.32})
c.Assert(cfg.Get("intSlice"), qt.DeepEquals, []interface{}{5, 8, 9})