aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/config_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-12-19 15:40:47 +0100
committerBjørn Erik Pedersen <[email protected]>2022-12-19 20:17:33 +0100
commit0d4b17d4c03bfcbe3a5959e2c1dc47f4f36e47ed (patch)
treeb3c13b3f3c93c5f37fcd1938ae79327b05c797da /modules/config_test.go
parent3afaca75844272c309da44d1f4b3b95dc8ee2e6f (diff)
downloadhugo-0d4b17d4c03bfcbe3a5959e2c1dc47f4f36e47ed.tar.gz
hugo-0d4b17d4c03bfcbe3a5959e2c1dc47f4f36e47ed.zip
modules: Make the module.workspace=off as default (note)
Also, resolve any workspace file relative to the workingDir. Fixes #10553
Diffstat (limited to 'modules/config_test.go')
-rw-r--r--modules/config_test.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/config_test.go b/modules/config_test.go
index 371aab056..4ded2be66 100644
--- a/modules/config_test.go
+++ b/modules/config_test.go
@@ -44,13 +44,13 @@ func TestDecodeConfig(t *testing.T) {
c.Run("Basic", func(c *qt.C) {
tomlConfig := `
+workingDir = "/src/project"
[module]
-
+workspace = "hugo.work"
[module.hugoVersion]
min = "0.54.2"
max = "0.199.0"
extended = true
-
[[module.mounts]]
source="src/project/blog"
target="content/blog"
@@ -83,6 +83,8 @@ lang="en"
c.Assert(hv.IsValid(), qt.Equals, true)
}
+ c.Assert(mcfg.Workspace, qt.Equals, "/src/project/hugo.work")
+
c.Assert(len(mcfg.Mounts), qt.Equals, 1)
c.Assert(len(mcfg.Imports), qt.Equals, 1)
imp := mcfg.Imports[0]
@@ -90,6 +92,7 @@ lang="en"
c.Assert(imp.Mounts[1].Source, qt.Equals, "src/markdown/blog")
c.Assert(imp.Mounts[1].Target, qt.Equals, "content/blog")
c.Assert(imp.Mounts[1].Lang, qt.Equals, "en")
+
})
c.Run("Replacements", func(c *qt.C) {