Skip to content

Commit b9b304a

Browse files
committed
testing: Port integration tests to new templates structure
As introduced in v0.146.0. Keep some legecy test to preserve backwards compatibility.
1 parent 8be30ef commit b9b304a

File tree

110 files changed

+1242
-1225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+1242
-1225
lines changed

‎cache/filecache/filecache_integration_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ title: "Home"
6767
---
6868
-- assets/a/pixel.png --
6969
iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
70-
-- layouts/index.html --
70+
-- layouts/home.html --
7171
{{ warnf "HOME!" }}
7272
{{ $img := resources.GetMatch "**.png" }}
7373
{{ $img = $img.Resize "3x3" }}

‎common/htime/htime_integration_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func TestApplyWithContext(t *testing.T) {
2626
files := `
2727
-- config.toml --
2828
defaultContentLanguage = 'it'
29-
-- layouts/index.html --
29+
-- layouts/home.html --
3030
{{ $dates := slice
3131
"2022-01-03"
3232
"2022-02-01"

‎common/hugo/hugo_integration_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ baseURL = 'https://en.example.org/'
3535
---
3636
title: home
3737
---
38-
-- layouts/index.html --
38+
-- layouts/home.html --
3939
multilingual={{ hugo.IsMultilingual }}
4040
multihost={{ hugo.IsMultihost }}
4141
`

‎common/paths/paths_integration_test.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ weight = 2
3535
removePathAccents = true
3636
-- content/διακριτικός.md --
3737
-- content/διακριτικός.fr.md --
38-
-- layouts/_default/single.html --
38+
-- layouts/single.html --
3939
{{ .Language.Lang }}|Single.
40-
-- layouts/_default/list.html --
40+
-- layouts/list.html --
4141
List
4242
`
4343
b := hugolib.Test(t, files)
@@ -64,9 +64,9 @@ disablePathToLower = true
6464
-- content/MySection/MyPage.fr.md --
6565
-- content/MySection/MyBundle/index.md --
6666
-- content/MySection/MyBundle/index.fr.md --
67-
-- layouts/_default/single.html --
67+
-- layouts/single.html --
6868
{{ .Language.Lang }}|Single.
69-
-- layouts/_default/list.html --
69+
-- layouts/list.html --
7070
{{ .Language.Lang }}|List.
7171
`
7272
b := hugolib.Test(t, files)

‎config/allconfig/allconfig_integration_test.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ title: "p1"
3939
---
4040
title: "p1"
4141
---
42-
-- layouts/_default/single.html --
42+
-- layouts/single.html --
4343
Title: {{ .Title }}
4444
`
4545

@@ -141,7 +141,7 @@ disableKinds = ["taxonomy", "term"]
141141
[pagination]
142142
disableAliases = true
143143
pagerSize = 2
144-
-- layouts/_default/list.html --
144+
-- layouts/list.html --
145145
{{ $paginator := .Paginate site.RegularPages }}
146146
{{ template "_internal/pagination.html" . }}
147147
{{ range $paginator.Pages }}
@@ -191,7 +191,7 @@ func TestInvalidOutputFormat(t *testing.T) {
191191
disableKinds = ['page','rss','section','sitemap','taxonomy','term']
192192
[outputs]
193193
home = ['html','foo']
194-
-- layouts/index.html --
194+
-- layouts/home.html --
195195
x
196196
`
197197

‎hugolib/404_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ baseURL = "http://example.com/"
7272
disableLiveReload = true
7373
[internal]
7474
fastRenderMode = true
75-
-- layouts/_default/baseof.html --
75+
-- layouts/baseof.html --
7676
Base: {{ block "main" . }}{{ end }}
7777
-- layouts/404.html --
7878
{{ define "main" }}

‎hugolib/alias_test.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ func TestAliasMultipleOutputFormats(t *testing.T) {
7272
files := `
7373
-- hugo.toml --
7474
baseURL = "http://example.com"
75-
-- layouts/_default/single.html --
75+
-- layouts/single.html --
7676
{{ .Content }}
77-
-- layouts/_default/single.amp.html --
77+
-- layouts/single.amp.html --
7878
{{ .Content }}
79-
-- layouts/_default/single.json --
79+
-- layouts/single.json --
8080
{{ .Content }}
8181
-- content/blog/page.md --
8282
---

‎hugolib/cascade_test.go‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ title: P1
8383
title: P2
8484
tags: [t1, t2]
8585
---
86-
-- layouts/_default/list.html --
86+
-- layouts/list.html --
8787
List: {{ len .Pages }}|
88-
-- layouts/_default/single.html --
88+
-- layouts/single.html --
8989
Single: Tags: {{ site.Taxonomies.tags }}|
9090
`
9191

@@ -105,9 +105,9 @@ func TestCascadeEditIssue12449(t *testing.T) {
105105
baseURL = "https://example.com"
106106
disableKinds = ['sitemap','rss', 'home', 'taxonomy','term']
107107
disableLiveReload = true
108-
-- layouts/_default/list.html --
108+
-- layouts/list.html --
109109
Title: {{ .Title }}|{{ .Content }}|cascadeparam: {{ .Params.cascadeparam }}|
110-
-- layouts/_default/single.html --
110+
-- layouts/single.html --
111111
Title: {{ .Title }}|{{ .Content }}|cascadeparam: {{ .Params.cascadeparam }}|
112112
-- content/mysect/_index.md --
113113
---
@@ -160,9 +160,9 @@ path = '/s1**'
160160
---
161161
title: p1
162162
---
163-
-- layouts/_default/single.html --
163+
-- layouts/single.html --
164164
{{ .Title }}|
165-
-- layouts/_default/list.html --
165+
-- layouts/list.html --
166166
{{ .Title }}|
167167
`
168168
b := Test(t, files)
@@ -195,9 +195,9 @@ cascade:
195195
---
196196
title: p1
197197
---
198-
-- layouts/_default/single.html --
198+
-- layouts/single.html --
199199
Background: {{ .Params.background }}|
200-
-- layouts/_default/list.html --
200+
-- layouts/list.html --
201201
{{ .Title }}|
202202
`
203203

@@ -214,9 +214,9 @@ func TestCascadeOverlap(t *testing.T) {
214214
files := `
215215
-- hugo.toml --
216216
disableKinds = ['home','rss','sitemap','taxonomy','term']
217-
-- layouts/_default/list.html --
217+
-- layouts/list.html --
218218
{{ .Title }}
219-
-- layouts/_default/single.html --
219+
-- layouts/single.html --
220220
{{ .Title }}
221221
-- content/s/_index.md --
222222
---

0 commit comments

Comments
 (0)