mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Revert "hugolib: Add some baseof test variants"
This reverts commit d11f37d97c
.
Will have to look more closely into this.
See #2995
This commit is contained in:
parent
d11f37d97c
commit
f404603340
1 changed files with 1 additions and 21 deletions
|
@ -42,16 +42,9 @@ func TestBaseGoTemplate(t *testing.T) {
|
|||
writeSource(t, fs, filepath.Join("layouts", "section", "sect-baseof.html"), `Base: {{block "main" .}}block{{end}}`)
|
||||
writeSource(t, fs, filepath.Join("layouts", "section", "sect.html"), `{{define "main"}}sect{{ end }}`)
|
||||
|
||||
// See #2995
|
||||
writeSource(t, fs, filepath.Join("layouts", "sect", "single.html"), `{{define "main"}}single sect{{ end }}`)
|
||||
|
||||
// Should not be picked.
|
||||
writeSource(t, fs, filepath.Join("layouts", "_default", "baseof.html"), `Base: {{block "main" .}}NO{{end}}`)
|
||||
|
||||
},
|
||||
func(t *testing.T) {
|
||||
assertFileContent(t, fs, filepath.Join("public", "sect", "index.html"), false, "Base: sect")
|
||||
assertFileContent(t, fs, filepath.Join("public", "sect", "page", "index.html"), false, "Base: single sect")
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -59,6 +52,7 @@ func TestBaseGoTemplate(t *testing.T) {
|
|||
func(t *testing.T) {
|
||||
writeSource(t, fs, filepath.Join("layouts", "baseof.html"), `Base: {{block "main" .}}block{{end}}`)
|
||||
writeSource(t, fs, filepath.Join("layouts", "index.html"), `{{define "main"}}index{{ end }}`)
|
||||
|
||||
},
|
||||
func(t *testing.T) {
|
||||
assertFileContent(t, fs, filepath.Join("public", "index.html"), false, "Base: index")
|
||||
|
@ -94,16 +88,9 @@ func TestBaseGoTemplate(t *testing.T) {
|
|||
writeSource(t, fs, filepath.Join("themes", "mytheme", "layouts", "section", "sect-baseof.html"), `Base Theme: {{block "main" .}}block{{end}}`)
|
||||
writeSource(t, fs, filepath.Join("layouts", "section", "sect.html"), `{{define "main"}}sect{{ end }}`)
|
||||
|
||||
// See #2995
|
||||
writeSource(t, fs, filepath.Join("themes", "mytheme", "layouts", "sect", "single.html"), `{{define "main"}}single sect{{ end }}`)
|
||||
|
||||
// Should not be picked.
|
||||
writeSource(t, fs, filepath.Join("themes", "mytheme", "layouts", "_default", "baseof.html"), `Base: {{block "main" .}}NO{{end}}`)
|
||||
|
||||
},
|
||||
func(t *testing.T) {
|
||||
assertFileContent(t, fs, filepath.Join("public", "sect", "index.html"), false, "Base: sect")
|
||||
assertFileContent(t, fs, filepath.Join("public", "sect", "page", "index.html"), false, "Base: single sect")
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -113,16 +100,9 @@ func TestBaseGoTemplate(t *testing.T) {
|
|||
writeSource(t, fs, filepath.Join("themes", "mytheme", "layouts", "section", "sect-baseof.html"), `Base Theme: {{block "main" .}}block{{end}}`)
|
||||
writeSource(t, fs, filepath.Join("layouts", "section", "sect.html"), `{{define "main"}}sect{{ end }}`)
|
||||
|
||||
// See #2995
|
||||
writeSource(t, fs, filepath.Join("themes", "mytheme", "layouts", "sect", "single.html"), `{{define "main"}}single sect{{ end }}`)
|
||||
|
||||
// Should not be picked.
|
||||
writeSource(t, fs, filepath.Join("themes", "mytheme", "layouts", "_default", "baseof.html"), `Base: {{block "main" .}}NO{{end}}`)
|
||||
|
||||
},
|
||||
func(t *testing.T) {
|
||||
assertFileContent(t, fs, filepath.Join("public", "sect", "index.html"), false, "Base Theme: sect")
|
||||
assertFileContent(t, fs, filepath.Join("public", "sect", "page", "index.html"), false, "Base: single sect")
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue