From 3073fd5ccf28183f6c43786345c6034bf037aa1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 27 Nov 2025 12:04:47 +0100 Subject: [PATCH] testing: Replace legacy config.toml with hugo.toml in most tests --- common/htime/htime_integration_test.go | 2 +- hugolib/config_legacy1_test.go | 42 +++++++++++++++++++ hugolib/config_test.go | 4 +- hugolib/content_map_test.go | 2 +- hugolib/dates_test.go | 2 +- hugolib/hugo_modules_test.go | 2 +- hugolib/hugo_smoke_test.go | 2 +- hugolib/hugolib_integration_test.go | 4 +- hugolib/language_content_dir_test.go | 2 +- hugolib/menu_test.go | 2 +- hugolib/page_test.go | 2 +- hugolib/paginator_test.go | 2 +- hugolib/renderstring_test.go | 6 +-- hugolib/site_test.go | 6 +-- langs/i18n/i18n_integration_test.go | 8 ++-- .../codeblocks/codeblocks_integration_test.go | 16 +++---- markup/goldmark/goldmark_integration_test.go | 30 ++++++------- .../images/images_integration_test.go | 2 +- .../passthrough_integration_test.go | 2 +- .../highlight/highlight_integration_test.go | 6 +-- related/related_integration_test.go | 2 +- resources/page/page_integration_test.go | 4 +- .../create/create_integration_test.go | 4 +- .../babel/babel_integration_test.go | 2 +- .../cssjs/postcss_integration_test.go | 2 +- .../js/js_integration_test.go | 8 ++-- .../minifier/minifier_integration_test.go | 2 +- .../templates/templates_integration_test.go | 2 +- .../dartsass/dartsass_integration_test.go | 20 ++++----- .../tocss/scss/scss_integration_test.go | 8 ++-- resources/resources_integration_test.go | 6 +-- .../collections_integration_test.go | 8 ++-- tpl/os/os_integration_test.go | 6 +-- tpl/page/page_integration_test.go | 4 +- tpl/partials/partials_integration_test.go | 20 ++++----- tpl/resources/resources_integration_test.go | 8 ++-- tpl/templates/templates_integration_test.go | 8 ++-- tpl/tplimpl/render_hook_integration_test.go | 2 +- tpl/tplimpl/templatestore_integration_test.go | 2 +- tpl/tplimpl/tplimpl_integration_test.go | 8 ++-- tpl/transform/transform_integration_test.go | 4 +- 41 files changed, 158 insertions(+), 116 deletions(-) create mode 100644 hugolib/config_legacy1_test.go diff --git a/common/htime/htime_integration_test.go b/common/htime/htime_integration_test.go index 596e9f130..4acdd4beb 100644 --- a/common/htime/htime_integration_test.go +++ b/common/htime/htime_integration_test.go @@ -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 index 000000000..6a09113d4 --- /dev/null +++ b/hugolib/config_legacy1_test.go @@ -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") + }) +} diff --git a/hugolib/config_test.go b/hugolib/config_test.go index 3f1e7e6e9..91b3cd0a6 100644 --- a/hugolib/config_test.go +++ b/hugolib/config_test.go @@ -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 -- diff --git a/hugolib/content_map_test.go b/hugolib/content_map_test.go index 92196b67f..2f1f73a2c 100644 --- a/hugolib/content_map_test.go +++ b/hugolib/content_map_test.go @@ -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 -- diff --git a/hugolib/dates_test.go b/hugolib/dates_test.go index 64c9e3dfb..7e886d596 100644 --- a/hugolib/dates_test.go +++ b/hugolib/dates_test.go @@ -205,7 +205,7 @@ func TestTOMLDates(t *testing.T) { t.Parallel() files := ` --- config.toml -- +-- hugo.toml -- timeZone = "America/Los_Angeles" -- content/_index.md -- --- diff --git a/hugolib/hugo_modules_test.go b/hugolib/hugo_modules_test.go index 84c41a216..cc0bde639 100644 --- a/hugolib/hugo_modules_test.go +++ b/hugolib/hugo_modules_test.go @@ -229,7 +229,7 @@ func TestMountsProject(t *testing.T) { t.Parallel() files := ` --- config.toml -- +-- hugo.toml -- baseURL="https://example.org" [module] diff --git a/hugolib/hugo_smoke_test.go b/hugolib/hugo_smoke_test.go index 923827d2d..524249856 100644 --- a/hugolib/hugo_smoke_test.go +++ b/hugolib/hugo_smoke_test.go @@ -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' diff --git a/hugolib/hugolib_integration_test.go b/hugolib/hugolib_integration_test.go index 0293e34d1..3d416c76c 100644 --- a/hugolib/hugolib_integration_test.go +++ b/hugolib/hugolib_integration_test.go @@ -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 -- --- diff --git a/hugolib/language_content_dir_test.go b/hugolib/language_content_dir_test.go index b0c1c2dbf..53bd8de2c 100644 --- a/hugolib/language_content_dir_test.go +++ b/hugolib/language_content_dir_test.go @@ -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' diff --git a/hugolib/menu_test.go b/hugolib/menu_test.go index 418de943a..2b9e5d9fb 100644 --- a/hugolib/menu_test.go +++ b/hugolib/menu_test.go @@ -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' diff --git a/hugolib/page_test.go b/hugolib/page_test.go index 56bb40011..939a9a82a 100644 --- a/hugolib/page_test.go +++ b/hugolib/page_test.go @@ -1899,7 +1899,7 @@ T-SHORT func TestPageHashString(t *testing.T) { files := ` --- config.toml -- +-- hugo.toml -- baseURL = "https://example.org" [languages] [languages.en] diff --git a/hugolib/paginator_test.go b/hugolib/paginator_test.go index 0b74a0ea5..7c860c269 100644 --- a/hugolib/paginator_test.go +++ b/hugolib/paginator_test.go @@ -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 -- diff --git a/hugolib/renderstring_test.go b/hugolib/renderstring_test.go index 80dd5d842..6d2aace74 100644 --- a/hugolib/renderstring_test.go +++ b/hugolib/renderstring_test.go @@ -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 -- --- diff --git a/hugolib/site_test.go b/hugolib/site_test.go index 76a6d5ef0..01da9d6b8 100644 --- a/hugolib/site_test.go +++ b/hugolib/site_test.go @@ -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 -- diff --git a/langs/i18n/i18n_integration_test.go b/langs/i18n/i18n_integration_test.go index daef46056..781d74909 100644 --- a/langs/i18n/i18n_integration_test.go +++ b/langs/i18n/i18n_integration_test.go @@ -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.' diff --git a/markup/goldmark/codeblocks/codeblocks_integration_test.go b/markup/goldmark/codeblocks/codeblocks_integration_test.go index 95ebdf4af..d2f2e0dda 100644 --- a/markup/goldmark/codeblocks/codeblocks_integration_test.go +++ b/markup/goldmark/codeblocks/codeblocks_integration_test.go @@ -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] diff --git a/markup/goldmark/goldmark_integration_test.go b/markup/goldmark/goldmark_integration_test.go index 0c9c381af..30841f1f6 100644 --- a/markup/goldmark/goldmark_integration_test.go +++ b/markup/goldmark/goldmark_integration_test.go @@ -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 -- {{ .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 -- {{ .Text | RENDERFUNC }} -- 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] diff --git a/markup/goldmark/images/images_integration_test.go b/markup/goldmark/images/images_integration_test.go index c6428f979..204c206be 100644 --- a/markup/goldmark/images/images_integration_test.go +++ b/markup/goldmark/images/images_integration_test.go @@ -11,7 +11,7 @@ func TestDisableWrapStandAloneImageWithinParagraph(t *testing.T) { t.Parallel() filesTemplate := ` --- config.toml -- +-- hugo.toml -- [markup.goldmark.renderer] unsafe = false [markup.goldmark.parser] diff --git a/markup/goldmark/passthrough/passthrough_integration_test.go b/markup/goldmark/passthrough/passthrough_integration_test.go index f151bfc4d..f6a9ead2c 100644 --- a/markup/goldmark/passthrough/passthrough_integration_test.go +++ b/markup/goldmark/passthrough/passthrough_integration_test.go @@ -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] diff --git a/markup/highlight/highlight_integration_test.go b/markup/highlight/highlight_integration_test.go index 841d879dd..a737d9a6a 100644 --- a/markup/highlight/highlight_integration_test.go +++ b/markup/highlight/highlight_integration_test.go @@ -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" diff --git a/related/related_integration_test.go b/related/related_integration_test.go index 644e0a60b..19a31acd2 100644 --- a/related/related_integration_test.go +++ b/related/related_integration_test.go @@ -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] diff --git a/resources/page/page_integration_test.go b/resources/page/page_integration_test.go index 1275bbb1e..79580f758 100644 --- a/resources/page/page_integration_test.go +++ b/resources/page/page_integration_test.go @@ -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] diff --git a/resources/resource_factories/create/create_integration_test.go b/resources/resource_factories/create/create_integration_test.go index fa57cb23f..e8efc59ea 100644 --- a/resources/resource_factories/create/create_integration_test.go +++ b/resources/resource_factories/create/create_integration_test.go @@ -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'] diff --git a/resources/resource_transformers/babel/babel_integration_test.go b/resources/resource_transformers/babel/babel_integration_test.go index 97ee0bee0..4344af2be 100644 --- a/resources/resource_transformers/babel/babel_integration_test.go +++ b/resources/resource_transformers/babel/babel_integration_test.go @@ -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] diff --git a/resources/resource_transformers/cssjs/postcss_integration_test.go b/resources/resource_transformers/cssjs/postcss_integration_test.go index 6223abb7d..b16640a3b 100644 --- a/resources/resource_transformers/cssjs/postcss_integration_test.go +++ b/resources/resource_transformers/cssjs/postcss_integration_test.go @@ -54,7 +54,7 @@ h1 { @apply text-2xl font-bold; } --- config.toml -- +-- hugo.toml -- disablekinds = ['taxonomy', 'term', 'page'] baseURL = "https://example.com" [build] diff --git a/resources/resource_transformers/js/js_integration_test.go b/resources/resource_transformers/js/js_integration_test.go index 2fd948c8a..686774d3a 100644 --- a/resources/resource_transformers/js/js_integration_test.go +++ b/resources/resource_transformers/js/js_integration_test.go @@ -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. diff --git a/resources/resource_transformers/minifier/minifier_integration_test.go b/resources/resource_transformers/minifier/minifier_integration_test.go index 34d349a50..656f4bb88 100644 --- a/resources/resource_transformers/minifier/minifier_integration_test.go +++ b/resources/resource_transformers/minifier/minifier_integration_test.go @@ -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 }}