]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
testing: Replace legacy config.toml with hugo.toml in most tests
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 27 Nov 2025 11:04:47 +0000 (12:04 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Thu, 27 Nov 2025 11:08:08 +0000 (12:08 +0100)
41 files changed:
common/htime/htime_integration_test.go
hugolib/config_legacy1_test.go [new file with mode: 0644]
hugolib/config_test.go
hugolib/content_map_test.go
hugolib/dates_test.go
hugolib/hugo_modules_test.go
hugolib/hugo_smoke_test.go
hugolib/hugolib_integration_test.go
hugolib/language_content_dir_test.go
hugolib/menu_test.go
hugolib/page_test.go
hugolib/paginator_test.go
hugolib/renderstring_test.go
hugolib/site_test.go
langs/i18n/i18n_integration_test.go
markup/goldmark/codeblocks/codeblocks_integration_test.go
markup/goldmark/goldmark_integration_test.go
markup/goldmark/images/images_integration_test.go
markup/goldmark/passthrough/passthrough_integration_test.go
markup/highlight/highlight_integration_test.go
related/related_integration_test.go
resources/page/page_integration_test.go
resources/resource_factories/create/create_integration_test.go
resources/resource_transformers/babel/babel_integration_test.go
resources/resource_transformers/cssjs/postcss_integration_test.go
resources/resource_transformers/js/js_integration_test.go
resources/resource_transformers/minifier/minifier_integration_test.go
resources/resource_transformers/templates/templates_integration_test.go
resources/resource_transformers/tocss/dartsass/dartsass_integration_test.go
resources/resource_transformers/tocss/scss/scss_integration_test.go
resources/resources_integration_test.go
tpl/collections/collections_integration_test.go
tpl/os/os_integration_test.go
tpl/page/page_integration_test.go
tpl/partials/partials_integration_test.go
tpl/resources/resources_integration_test.go
tpl/templates/templates_integration_test.go
tpl/tplimpl/render_hook_integration_test.go
tpl/tplimpl/templatestore_integration_test.go
tpl/tplimpl/tplimpl_integration_test.go
tpl/transform/transform_integration_test.go

index 596e9f130457ab154fa1a35d2d0e3f6de4324498..4acdd4beb976d061af8f35015d49780544ccbbdf 100644 (file)
@@ -24,7 +24,7 @@ func TestApplyWithContext(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 defaultContentLanguage = 'it'
 -- layouts/home.html --
 {{ $dates := slice
diff --git a/hugolib/config_legacy1_test.go b/hugolib/config_legacy1_test.go
new file mode 100644 (file)
index 0000000..6a09113
--- /dev/null
@@ -0,0 +1,42 @@
+// Copyright 2025 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.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package hugolib
+
+import (
+       "strings"
+       "testing"
+)
+
+func TestLegacyConfigDotToml(t *testing.T) {
+       const filesTemplate = `
+-- config.toml --
+title = "My Site"
+-- layouts/home.html --
+Site: {{ .Site.Title }}
+
+  `
+       t.Run("In root", func(t *testing.T) {
+               t.Parallel()
+               files := filesTemplate
+               b := Test(t, files)
+               b.AssertFileContent("public/index.html", "Site: My Site")
+       })
+
+       t.Run("In config dir", func(t *testing.T) {
+               t.Parallel()
+               files := strings.Replace(filesTemplate, "-- config.toml --", "-- config/_default/config.toml --", 1)
+               b := Test(t, files)
+               b.AssertFileContent("public/index.html", "Site: My Site")
+       })
+}
index 3f1e7e6e90d64f089e24388840eb9fa26f3bf46d..91b3cd0a6a49ac04344f15c9b7ae3217bbb98371 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2025-present The Hugo Authors. All rights reserved.
+// Copyright 2025 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.
@@ -640,7 +640,7 @@ func TestInvalidDefaultMarkdownHandler(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 [markup]
 defaultMarkdownHandler = 'blackfriday'
 -- content/_index.md --
index 92196b67fbc516984204365b1d97946141a828bd..2f1f73a2cd986208d6f3cbe0d6a7ede1f20fe26f 100644 (file)
@@ -202,7 +202,7 @@ func TestIntegrationTestTemplate(t *testing.T) {
        c := qt.New(t)
 
        files := `
--- config.toml --
+-- hugo.toml --
 title = "Integration Test"
 disableKinds=["page", "section", "taxonomy", "term", "sitemap", "robotsTXT", "RSS"]
 -- layouts/home.html --
index 64c9e3dfba71e977dd62d8c72432a32c8e76b593..7e886d5967cedc71648a768b16baa9600b146220 100644 (file)
@@ -205,7 +205,7 @@ func TestTOMLDates(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 timeZone = "America/Los_Angeles"
 -- content/_index.md --
 ---
index 84c41a216bf323791ffd3f8c21ae25ca55fe8c21..cc0bde639f487e858cf962db9537613ac7d280f8 100644 (file)
@@ -229,7 +229,7 @@ func TestMountsProject(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL="https://example.org"
 
 [module]
index 923827d2d0043ce7c4bee03f513bc4feed230ae3..52424985633fcbfb08588cb7301ac0c1ed3fdf53 100644 (file)
@@ -782,7 +782,7 @@ func benchmarkBaselineFiles(leafBundles bool) string {
        rnd := rand.New(rand.NewSource(32))
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = "https://example.com"
 defaultContentLanguage = 'en'
 
index 0293e34d1c0c60ab892ead7e6e521b3778f6e515..3d416c76c8b533c08d15ac9035d7e7f6343dacf3 100644 (file)
@@ -25,7 +25,7 @@ func TestPageTranslationsMap(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'https://example.org/'
 title = 'Issue-9073'
 defaultContentLanguageInSubdir = true
@@ -118,7 +118,7 @@ func TestTitleCaseStyleWithAutomaticSectionPages(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 titleCaseStyle = 'none'
 -- content/books/book-1.md --
 ---
index b0c1c2dbf8f03f8fcc4c5ae9b86c981320d72f5d..53bd8de2cb00883577bfbe103eb5173bb445b509 100644 (file)
@@ -61,7 +61,7 @@ func TestContentMountMerge(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'https://example.org/'
 languageCode = 'en-us'
 title = 'Hugo Forum Topic #37225'
index 418de943a66c04106d64ea9b3ab7e02227302271..2b9e5d9fb6bbeae7fe0d6caa6b099d87bae5273b 100644 (file)
@@ -423,7 +423,7 @@ func TestMenuHasMenuCurrentSection(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 disableKinds = ['RSS','sitemap','taxonomy','term']
 [[menu.main]]
 name = 'Home'
index 56bb4001131a866e3ad086df59d3862a0730acd5..939a9a82a02e67d40863a88fc82717505b08b273 100644 (file)
@@ -1899,7 +1899,7 @@ T-SHORT
 
 func TestPageHashString(t *testing.T) {
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = "https://example.org"
 [languages]
 [languages.en]
index 0b74a0ea58d98a250162550fcef45914b228cb2d..7c860c269f6b65c95bb5c1e57876ae5dfcc13de1 100644 (file)
@@ -175,7 +175,7 @@ func TestPaginatorEmptyPageGroups(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = "https://example.com/"
 -- content/p1.md --
 -- content/p2.md --
index 80dd5d842e901c9da520fc7598d834008f8990fe..6d2aace749d440b507f7821edc3dfe3617aeec3d 100644 (file)
@@ -98,7 +98,7 @@ func TestRenderStringWithShortcode(t *testing.T) {
        t.Parallel()
 
        filesTemplate := `
--- config.toml --
+-- hugo.toml --
 title = "Hugo Rocks!"
 enableInlineShortcodes = true
 -- content/p1/index.md --
@@ -166,7 +166,7 @@ func TestRenderStringWithShortcodeInPageWithNoContentFile(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 -- layouts/_shortcodes/myshort.html --
 Page Kind: {{ .Page.Kind }}
 -- layouts/home.html --
@@ -190,7 +190,7 @@ func TestRenderStringWithShortcodeIssue10654(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 timeout = '300ms'
 -- content/p1.md --
 ---
index 76a6d5ef0d19abdab220cc071d2b77cf4249bf27..01da9d6b87aafc4dc807c59533955ce323d540e9 100644 (file)
@@ -326,7 +326,7 @@ func TestMainSectionsMoveToSite(t *testing.T) {
                t.Parallel()
 
                files := `
--- config.toml --
+-- hugo.toml --
 disableKinds = ['RSS','sitemap','taxonomy','term']
 [params]
 mainSections=["a", "b"]
@@ -351,7 +351,7 @@ MainSections Site method: [a b]|
                t.Parallel()
 
                files := `
--- config.toml --
+-- hugo.toml --
 disableKinds = ['RSS','sitemap','taxonomy','term']
 mainSections=["a", "b"]
 [params]
@@ -380,7 +380,7 @@ MainSections Site method: [a b]|
                t.Parallel()
 
                files := `
--- config.toml --
+-- hugo.toml --
 disableKinds = ['RSS','sitemap','taxonomy','term']
 -- content/mysect/page1.md --
 -- layouts/home.html --
index daef46056da493225e6847d9a00b3d2614272730..781d749093bd8518f7dbc19ff6addfebfc8a09bf 100644 (file)
@@ -24,7 +24,7 @@ func TestI18nFromTheme(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 [module]
 [[module.imports]]
 path = "mytheme"
@@ -56,7 +56,7 @@ func TestPassPageToI18n(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 -- content/_index.md --
 ---
 title: "Home"
@@ -100,7 +100,7 @@ func TestI18nDefaultContentLanguage(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 disableKinds = ['RSS','sitemap','taxonomy','term','page','section']
 defaultContentLanguage = 'es'
 defaultContentLanguageInSubdir = true
@@ -133,7 +133,7 @@ func TestI18nReservedKeyMap(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 -- i18n/en.toml --
 [description]
 other = 'This is a description from i18n.'
index 95ebdf4af4a96a21ea8b6fd886b84cfb3c50e358..d2f2e0ddaca62395143ccd6a1cd6768679e1c3cb 100644 (file)
@@ -27,7 +27,7 @@ func TestCodeblocks(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 [markup]
   [markup.highlight]
     anchorLineNos = false
@@ -116,7 +116,7 @@ func TestHighlightCodeblock(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 [markup]
 [markup.highlight]
 anchorLineNos = false
@@ -161,7 +161,7 @@ func TestCodeblocksBugs(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 -- layouts/_markup/render-codeblock.html --
 {{ .Position | safeHTML }}
 -- layouts/single.html --
@@ -192,7 +192,7 @@ func TestCodeChomp(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 -- content/p1.md --
 ---
 title: "p1"
@@ -217,7 +217,7 @@ func TestCodePosition(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 -- content/p1.md --
 ---
 title: "p1"
@@ -246,7 +246,7 @@ func TestAttributes(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 -- content/p1.md --
 ---
 title: "p1"
@@ -274,7 +274,7 @@ func TestAttributesChroma(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 -- content/p1.md --
 ---
 title: "p1"
@@ -309,7 +309,7 @@ Attributes: {{ .Attributes }}|Options: {{ .Options }}|
 
 func TestPanics(t *testing.T) {
        files := `
--- config.toml --
+-- hugo.toml --
 [markup]
 [markup.goldmark]
 [markup.goldmark.parser]
index 0c9c381afd7dfb67593bc9ddbee7ef9b6af05f22..30841f1f6b827bd6526cc16c7a6ae12c27d6a7a0 100644 (file)
@@ -28,7 +28,7 @@ func TestAttributeExclusion(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 [markup.goldmark.renderer]
        unsafe = false
 [markup.goldmark.parser.attribute]
@@ -136,7 +136,7 @@ func TestLinkInTitle(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 -- content/p1.md --
 ---
 title: "p1"
@@ -165,7 +165,7 @@ func TestHighlight(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 [markup]
 [markup.highlight]
 anchorLineNos = false
@@ -233,7 +233,7 @@ LINE8
 
 func BenchmarkRenderHooks(b *testing.B) {
        files := `
--- config.toml --
+-- hugo.toml --
 -- layouts/_markup/render-heading.html --
 <h{{ .Level }} id="{{ .Anchor | safeURL }}">
        {{ .Text }}
@@ -289,7 +289,7 @@ D.
 
 func BenchmarkCodeblocks(b *testing.B) {
        filesTemplate := `
--- config.toml --
+-- hugo.toml --
 [markup]
   [markup.highlight]
     anchorLineNos = false
@@ -363,7 +363,7 @@ func TestHookInfiniteRecursion(t *testing.T) {
        for _, renderFunc := range []string{"markdownify", ".Page.RenderString"} {
                t.Run(renderFunc, func(t *testing.T) {
                        files := `
--- config.toml --
+-- hugo.toml --
 -- layouts/_markup/render-link.html --
 <a href="{{ .Destination | safeURL }}">{{ .Text | RENDERFUNC }}</a>
 -- layouts/single.html --
@@ -400,7 +400,7 @@ func TestQuotesInImgAltAttr(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 [markup.goldmark.extensions]
   typographer = false
 -- content/p1.md --
@@ -424,7 +424,7 @@ func TestLinkifyProtocol(t *testing.T) {
 
        runTest := func(protocol string, withHook bool) *hugolib.IntegrationTestBuilder {
                files := `
--- config.toml --
+-- hugo.toml --
 [markup.goldmark]
 [markup.goldmark.extensions]
 linkify = true
@@ -488,7 +488,7 @@ func TestGoldmarkBugs(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 [markup.goldmark.renderer]
 unsafe = true
 -- content/p1.md --
@@ -558,7 +558,7 @@ func TestGoldmarkEmojiExtension(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 enableEmoji = true
 -- content/p1.md --
 ---
@@ -614,7 +614,7 @@ func TestEmojiDisabled(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 enableEmoji = false
 -- content/p1.md --
 ---
@@ -653,7 +653,7 @@ func TestGoldmarkTemplateDelims(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 [minify]
   minifyOutput = true
 [minify.tdewolff.html]
@@ -675,7 +675,7 @@ func TestPassthroughInlineFences(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 [markup.goldmark.extensions.passthrough]
 enable = true
 [markup.goldmark.extensions.passthrough.delimiters]
@@ -702,7 +702,7 @@ func TestPassthroughBlockFences(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 [markup.goldmark.extensions.passthrough]
 enable = true
 [markup.goldmark.extensions.passthrough.delimiters]
@@ -731,7 +731,7 @@ func TestPassthroughWithAlternativeFences(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 [markup.goldmark.extensions.passthrough]
 enable = true
 [markup.goldmark.extensions.passthrough.delimiters]
index c6428f979d52e9cce83ea9aa7c53582061bf89b7..204c206beb22254e826ab752fe9f584b4ea03b99 100644 (file)
@@ -11,7 +11,7 @@ func TestDisableWrapStandAloneImageWithinParagraph(t *testing.T) {
        t.Parallel()
 
        filesTemplate := `
--- config.toml --
+-- hugo.toml --
 [markup.goldmark.renderer]
        unsafe = false
 [markup.goldmark.parser]
index f151bfc4d32b2e29a485272eeb561f04716f5b28..f6a9ead2c04cbea7b020de1eaf51d0d1956ff7fe 100644 (file)
@@ -23,7 +23,7 @@ func TestPassthroughRenderHook(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 [markup.goldmark.extensions.passthrough]
 enable = true
 [markup.goldmark.extensions.passthrough.delimiters]
index 841d879dda66f656f883f3b776faf55c6a02288b..a737d9a6a79779d825d8203964e0b335b335c469 100644 (file)
@@ -23,7 +23,7 @@ func TestHighlightInline(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 [markup]
 [markup.highlight]
 codeFences = true
@@ -83,7 +83,7 @@ func TestIssue11311(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 [markup.highlight]
 noClasses = false
 -- content/_index.md --
@@ -108,7 +108,7 @@ func TestHighlightClass(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 [markup.highlight]
 noClasses = false
 wrapperClass = "highlight no-prose"
index 644e0a60b4bbe3e31cb539ec26c2301303803dcc..19a31acd234eee1e63359e05bc4e283a1a926879 100644 (file)
@@ -135,7 +135,7 @@ Related 2: 2
 
 func BenchmarkRelatedSite(b *testing.B) {
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = "http://example.com/"
 disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT"]
 [related]
index 1275bbb1e479619980570a31319a73177d894c4a..79580f75839d3185a45d32be5bd61e3069152ab0 100644 (file)
@@ -21,7 +21,7 @@ import (
 
 func TestGroupByLocalizedDate(t *testing.T) {
        files := `
--- config.toml --
+-- hugo.toml --
 defaultContentLanguage = 'en'
 defaultContentLanguageInSubdir = true
 [languages]
@@ -72,7 +72,7 @@ date: "2020-02-01"
 
 func TestPagesSortCollation(t *testing.T) {
        files := `
--- config.toml --
+-- hugo.toml --
 defaultContentLanguage = 'en'
 defaultContentLanguageInSubdir = true
 [languages]
index fa57cb23f255fedfbfbd1fa96144e682c978474a..e8efc59eab2728fab513bbe41990e90667cc2259 100644 (file)
@@ -26,7 +26,7 @@ import (
 
 func TestGetRemoteHead(t *testing.T) {
        files := `
--- config.toml --
+-- hugo.toml --
 [security]
   [security.http]
     methods = ['(?i)GET|POST|HEAD']
@@ -62,7 +62,7 @@ func TestGetRemoteHead(t *testing.T) {
 
 func TestGetRemoteResponseHeaders(t *testing.T) {
        files := `
--- config.toml --
+-- hugo.toml --
 [security]
   [security.http]
     methods = ['(?i)GET|POST|HEAD']
index 97ee0bee0c4f89f60a4918867102060f1b33e56d..4344af2befebe96c0dd4941c38fc057ffe61fb9a 100644 (file)
@@ -47,7 +47,7 @@ console.error("Hugo Environment:", process.env.HUGO_ENVIRONMENT );
 module.exports = {
        presets: ["@babel/preset-env"],
 };
--- config.toml --
+-- hugo.toml --
 disablekinds = ['taxonomy', 'term', 'page']
 [security]
        [security.exec]
index 6223abb7d6f7da0748e8d22386f3c244f84c9f09..b16640a3ba48a96e1ea2187bd0991b39458522ed 100644 (file)
@@ -54,7 +54,7 @@ h1 {
        @apply text-2xl font-bold;
 }
 
--- config.toml --
+-- hugo.toml --
 disablekinds = ['taxonomy', 'term', 'page']
 baseURL = "https://example.com"
 [build]
index 2fd948c8a0323cbc3a3119541fa99e324ec927e6..686774d3a9d39eaa259172796f037c6cbf19f108 100644 (file)
@@ -30,7 +30,7 @@ func TestBuildVariants(t *testing.T) {
        c := qt.New(t)
 
        mainWithImport := `
--- config.toml --
+-- hugo.toml --
 disableKinds=["page", "section", "taxonomy", "term", "sitemap", "robotsTXT"]
 disableLiveReload = true
 -- assets/js/main.js --
@@ -86,7 +86,7 @@ func TestBuildWithModAndNpm(t *testing.T) {
        c := qt.New(t)
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = "https://example.org"
 disableKinds=["page", "section", "taxonomy", "term", "sitemap", "robotsTXT"]
 [module]
@@ -163,7 +163,7 @@ function greeter(person: string) {
 }
 let user = [0, 1, 2];
 document.body.textContent = greeter(user);
--- config.toml --
+-- hugo.toml --
 disablekinds = ['taxonomy', 'term', 'page']
 -- content/p1.md --
 Content.
@@ -235,7 +235,7 @@ func TestBuildError(t *testing.T) {
        c := qt.New(t)
 
        filesTemplate := `
--- config.toml --
+-- hugo.toml --
 disableKinds=["page", "section", "taxonomy", "term", "sitemap", "robotsTXT"]
 -- assets/js/main.js --
 // A comment.
index 34d349a50dccfc4080d6029e7e9f7ef15575c490..656f4bb885bca4d3422377e5062c4916c361c15e 100644 (file)
@@ -27,7 +27,7 @@ func TestTransformMinify(t *testing.T) {
        files := `
 -- assets/js/test.js --
 new Date(2002, 04, 11)
--- config.toml --
+-- hugo.toml --
 -- layouts/home.html --
 {{ $js := resources.Get "js/test.js" | minify }}
 <script>
index 4dc0e536e56095101ec362b1703e0a8e5114e05f..6cad28fa9d84f2ade70fdcaa60115733d220bd21 100644 (file)
@@ -23,7 +23,7 @@ func TestExecuteAsTemplateMultipleLanguages(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = "http://example.com/blog"
 defaultContentLanguage = "fr"
 defaultContentLanguageInSubdir = true
index 6dbc60fae624b7096e974382ce270683b92a3b40..e0d493d08e033a5332086a91ad8add4643960065 100644 (file)
@@ -39,7 +39,7 @@ $moolor: #fff;
 moo {
   color: $moolor;
 }
--- config.toml --
+-- hugo.toml --
 -- layouts/home.html --
 {{ $cssOpts := (dict "includePaths" (slice "node_modules/foo") "transpiler" "dartsass" ) }}
 {{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts  | minify  }}
@@ -80,7 +80,7 @@ moo {
 /* foo */
 -- assets/scss/regular.css --
 
--- config.toml --
+-- hugo.toml --
 -- layouts/home.html --
 {{ $r := resources.Get "scss/main.scss" |  toCSS (dict "transpiler" "dartsass")  }}
 T1: {{ $r.Content | safeHTML }}
@@ -124,7 +124,7 @@ func TestTransformImportIndentedSASS(t *testing.T) {
 @import "moo";
 
 /* foo */
--- config.toml --
+-- hugo.toml --
 -- layouts/home.html --
 {{ $r := resources.Get "scss/main.scss" |  toCSS (dict "transpiler" "dartsass")  }}
 T1: {{ $r.Content | safeHTML }}
@@ -167,7 +167,7 @@ a {color: import-this-mounted-file-css;}
 -- layouts/home.html --
 {{- $opts := dict "transpiler" "dartsass" }}
 {{- with resources.Get "main.scss" | toCSS $opts }}{{ .Content | safeHTML }}{{ end }}
--- config.toml --
+-- hugo.toml --
 disableKinds = ['RSS','sitemap','taxonomy','term','page','section']
 
 [[module.mounts]]
@@ -222,7 +222,7 @@ $moolor: #ccc;
 moo {
        color: $moolor;
 }
--- config.toml --
+-- hugo.toml --
 theme = 'mytheme'
 -- layouts/home.html --
 {{ $cssOpts := (dict "includePaths" (slice "node_modules/foo" ) "transpiler" "dartsass" ) }}
@@ -276,7 +276,7 @@ func TestTransformLogging(t *testing.T) {
 @warn "foo";
 @debug "bar";
 
--- config.toml --
+-- hugo.toml --
 disableKinds = ["term", "taxonomy", "section", "page"]
 -- layouts/home.html --
 {{ $cssOpts := (dict  "transpiler" "dartsass" ) }}
@@ -305,7 +305,7 @@ func TestTransformErrors(t *testing.T) {
        c := qt.New(t)
 
        const filesTemplate = `
--- config.toml --
+-- hugo.toml --
 -- assets/scss/components/_foo.scss --
 /* comment line 1 */
 $foocolor: #ccc;
@@ -418,7 +418,7 @@ func TestOptionVarsParams(t *testing.T) {
        }
 
        files := `
--- config.toml --
+-- hugo.toml --
 [params]
 [params.sassvars]
 color1 = "blue"
@@ -466,7 +466,7 @@ func TestVarsCasting(t *testing.T) {
        }
 
        files := `
--- config.toml --
+-- hugo.toml --
 disableKinds = ["term", "taxonomy", "section", "page"]
 
 [params]
@@ -625,7 +625,7 @@ $moolor: #fff;
 moo {
   color: $moolor;
 }
--- config.toml --
+-- hugo.toml --
 -- layouts/home.html --
 {{ $cssOpts := (dict "includePaths" (slice "node_modules/foo") "transpiler" "dartsass" ) }}
 {{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts  | minify  }}
index 69c40dd67665aa63dbc1cc9f43c4c1d13b7f027e..77c3ed37baac0df1bf2fdb5632e92eafd995536c 100644 (file)
@@ -41,7 +41,7 @@ $moolor: #fff;
 moo {
   color: $moolor;
 }
--- config.toml --
+-- hugo.toml --
 -- layouts/home.html --
 {{ $cssOpts := (dict "includePaths" (slice "node_modules/foo") ) }}
 {{ $r := resources.Get "scss/main.scss" |  toCSS $cssOpts  | minify  }}
@@ -84,7 +84,7 @@ moo {
 /* foo */
 -- assets/scss/regular.css --
 
--- config.toml --
+-- hugo.toml --
 -- layouts/home.html --
 {{ $r := resources.Get "scss/main.scss" |  toCSS }}
 T1: {{ $r.Content | safeHTML }}
@@ -136,7 +136,7 @@ $moolor: #ccc;
 moo {
        color: $moolor;
 }
--- config.toml --
+-- hugo.toml --
 theme = 'mytheme'
 -- layouts/home.html --
 {{ $cssOpts := (dict "includePaths" (slice "node_modules/foo" ) ) }}
@@ -187,7 +187,7 @@ func TestTransformErrors(t *testing.T) {
        c := qt.New(t)
 
        const filesTemplate = `
--- config.toml --
+-- hugo.toml --
 theme = 'mytheme'
 -- assets/scss/components/_foo.scss --
 /* comment line 1 */
index d5295c872a567a0aa53cce656d454b3ef1772820..54c6122cbecc89f667e4dfdd68890dbfcc37d024 100644 (file)
@@ -26,7 +26,7 @@ func TestImageCache(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 disableLiveReload = true
 baseURL = "https://example.org"
 -- content/mybundle/index.md --
@@ -80,7 +80,7 @@ func TestSVGError(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 -- assets/circle.svg --
 <svg height="100" width="100"><circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" /></svg>
 -- layouts/home.html --
@@ -170,7 +170,7 @@ func TestGroupByParamDate(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 disableKinds = ['section','rss','sitemap','taxonomy','term']
 -- layouts/home.html --
 {{- range site.RegularPages.GroupByParamDate "eventDate" "2006-01" }}
index d2aed1d7b146731f17d3a5269d3d953f5a5bb571..1adfd5abf5c69d365f9fd33de7f5b0345d891265 100644 (file)
@@ -24,7 +24,7 @@ func TestApplyWithContext(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 -- layouts/home.html --
 {{ apply (seq 3) "partial" "foo.html"}}
@@ -44,7 +44,7 @@ func TestSortStable(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 -- layouts/home.html --
 {{ $values := slice (dict "a" 1 "b" 2) (dict "a" 3 "b" 1) (dict "a" 2 "b" 0) (dict "a" 1 "b" 0) (dict "a" 3 "b" 1) (dict "a" 2 "b" 2) (dict "a" 2 "b" 1) (dict "a" 0 "b" 3) (dict "a" 3 "b" 3) (dict "a" 0 "b" 0) (dict "a" 0 "b" 0) (dict "a" 2 "b" 0) (dict "a" 1 "b" 2) (dict "a" 1 "b" 1) (dict "a" 3 "b" 0) (dict "a" 2 "b" 0) (dict "a" 3 "b" 0) (dict "a" 3 "b" 0) (dict "a" 3 "b" 0) (dict "a" 3 "b" 1) }}
 Asc:  {{ sort (sort $values "b" "asc") "a" "asc" }}
@@ -141,7 +141,7 @@ func TestWhereWithWordCount(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 -- layouts/home.html --
 Home: {{ range where site.RegularPages "WordCount" "gt" 50 }}{{ .Title }}|{{ end }}
@@ -255,7 +255,7 @@ func TestUnionResourcesMatch(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 disableKinds = ['rss','sitemap', 'taxonomy', 'term', 'page']
 -- layouts/home.html --
 {{ $a := resources.Match "*a*" }}
index e7f3c8810f7b2a0a0417c10ef57e495b74e01472..cd9cadba3ad182333134bafcb41b5b2ffdcbcadf 100644 (file)
@@ -24,7 +24,7 @@ func TestReadDirWorkDir(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 theme = "mytheme"
 -- myproject.txt --
 Hello project!
@@ -46,7 +46,7 @@ START:|{{ range $entry := $entries }}{{ if not $entry.IsDir }}{{ $entry.Name }}|
        ).Build()
 
        b.AssertFileContent("public/index.html", `
-START:|config.toml|myproject.txt|:END:
+START:|hugo.toml|myproject.txt|:END:
 `)
 }
 
@@ -55,7 +55,7 @@ func TestReadFileNotExists(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 -- layouts/home.html --
 {{ $fi := (readFile "doesnotexist") }}
 {{ if $fi }}Failed{{ else }}OK{{ end }}
index e6d556dd3ac9e3947f82d1150d9d7e26d04a25cd..6b5fc7ca47b6ea90ca18a0dee8b65f83703b0375 100644 (file)
@@ -25,7 +25,7 @@ func TestThatPageIsAvailableEverywhere(t *testing.T) {
        t.Parallel()
 
        filesTemplate := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 disableKinds = ["taxonomy", "term"]
 enableInlineShortcodes = true
@@ -184,7 +184,7 @@ func TestPageTableOfContentsInShortcode(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 disableKinds = ["taxonomy", "term"]
 -- content/p1.md --
index fccb746372dd34969f19860e6011ecc76455f7ef..a7fee50cd7514aee96b14031af93c96b7d1bac9f 100644 (file)
@@ -31,7 +31,7 @@ func TestInclude(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 -- layouts/home.html --
 partial: {{ partials.Include "foo.html" . }}
@@ -50,7 +50,7 @@ func TestIncludeCached(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 -- layouts/home.html --
 partialCached: {{ partials.IncludeCached "foo.html" . }}
@@ -72,7 +72,7 @@ func TestIncludeCachedRecursion(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 -- layouts/home.html --
 {{ partials.IncludeCached "p1.html" . }}
@@ -95,7 +95,7 @@ func TestIncludeCachedRecursionShortcode(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 -- content/_index.md --
 ---
@@ -127,7 +127,7 @@ func TestIncludeCacheHints(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 templateMetrics=true
 templateMetricsHints=true
@@ -205,7 +205,7 @@ D1
 // gobench --package ./tpl/partials
 func BenchmarkIncludeCached(b *testing.B) {
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 -- layouts/home.html --
 -- layouts/single.html --
@@ -250,7 +250,7 @@ func TestIncludeTimeout(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 -- layouts/home.html --
 {{ partials.Include "foo.html" . }}
@@ -273,7 +273,7 @@ func TestIncludeCachedTimeout(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 timeout = '200ms'
 -- layouts/home.html --
@@ -300,7 +300,7 @@ func TestIncludeCachedDifferentKey(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 timeout = '200ms'
 -- layouts/home.html --
@@ -326,7 +326,7 @@ func TestReturnExecuteFromTemplateInPartial(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 -- layouts/home.html --
 {{ $r :=  partial "foo" }}
index 9e26a09ab48771f1a462ae9b373bb9d8258f91c1..919afe4997d2780c510b0ef637be505cb43c2127 100644 (file)
@@ -26,7 +26,7 @@ func TestCopy(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = "http://example.com/blog"
 -- assets/images/pixel.png --
 iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
@@ -79,7 +79,7 @@ func TestCopyPageShouldFail(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 -- layouts/home.html --
 {{/* This is currently not supported. */}}
 {{ $copy := .Copy "copy.md" }}
@@ -99,7 +99,7 @@ func TestGet(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = "http://example.com/blog"
 -- assets/images/pixel.png --
 iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
@@ -123,7 +123,7 @@ func TestResourcesGettersShouldNotNormalizePermalinks(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = "http://example.com/"
 -- assets/401K Prospectus.txt --
 Prospectus.
index 5900ed685024e7f26620e0aeb42e4d66011b2f59..479103d2646652a11351aa9bba7361f5abfc5f64 100644 (file)
@@ -25,7 +25,7 @@ func TestExists(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 -- layouts/home.html --
 home.html: {{ templates.Exists "home.html" }}
@@ -50,7 +50,7 @@ func TestExistsWithBaseOf(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 -- layouts/baseof.html --
 {{ block "main" . }}{{ end }}
@@ -81,7 +81,7 @@ func TestPageFunctionExists(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 -- layouts/home.html --
 Home: {{ page.IsHome }}
@@ -100,7 +100,7 @@ func TestTry(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 -- layouts/home.html --
 Home.
index 640748e60413afa833443f2f7b475f37a9568d1d..b3e0e1fd41b680cea393e70fde70ae22b6e345aa 100644 (file)
@@ -143,7 +143,7 @@ func TestEmbeddedImageRenderHook(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'https://example.org/dir/'
 disableKinds = ['home','rss','section','sitemap','taxonomy','term']
 [markup.goldmark.extensions.typographer]
index b667221bf83334b7940c3e1f159a7f95378f5dbd..4c01ac3fd5e66a457787076abd8ced6ca560464a 100644 (file)
@@ -351,7 +351,7 @@ func TestPrintUnusedTemplates(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 printUnusedTemplates=true
 -- content/p1.md --
index f2b76b72b1435dab4ca6cf02bebed41aa3088878..0b0b7abe2461c35bf99f686cbb1027761012b56b 100644 (file)
@@ -28,7 +28,7 @@ func TestGo18Constructs(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 disableKinds = ["section", "home", "rss", "taxonomy",  "term", "rss"]
 -- content/p1.md --
@@ -97,7 +97,7 @@ func TestCommentsBeforeBlockDefinition(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 baseURL = 'http://example.com/'
 -- content/s1/p1.md --
 ---
@@ -142,7 +142,7 @@ func TestGoTemplateBugs(t *testing.T) {
                t.Parallel()
 
                files := `
--- config.toml --
+-- hugo.toml --
 -- layouts/home.html --
 {{ $m := dict "key" "value" }}
 {{ $k := "" }}
@@ -166,7 +166,7 @@ func TestGoTemplateBugs(t *testing.T) {
 
 func TestSecurityAllowActionJSTmpl(t *testing.T) {
        filesTemplate := `
--- config.toml --
+-- hugo.toml --
 SECURITYCONFIG
 -- layouts/home.html --
 <script>
index 801738d52d7101c43c5d542f1085bf4fbdf066cd..3cc96f20ab219ec7368e8492eac3f3548dfd3063 100644 (file)
@@ -27,7 +27,7 @@ func TestMarkdownifyIssue11698(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 disableKinds = ['home','section','rss','sitemap','taxonomy','term']
 [markup.goldmark.parser.attribute]
 title = true
@@ -73,7 +73,7 @@ func TestXMLEscape(t *testing.T) {
        t.Parallel()
 
        files := `
--- config.toml --
+-- hugo.toml --
 disableKinds = ['section','sitemap','taxonomy','term']
 -- content/p1.md --
 ---