mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
hugolib: Only run variable variable overwrite test on Go 1.11
This commit is contained in:
@@ -257,7 +257,10 @@ T2: Content: {{ $combinedText.Content }}|{{ $combinedText.RelPermalink }}
|
||||
b.AssertFileContent("public/rocks/hugo.txt", "Hugo Rocks!")
|
||||
|
||||
}},
|
||||
{"execute-as-template", func() bool { return true }, func(b *sitesBuilder) {
|
||||
{"execute-as-template", func() bool {
|
||||
// TODO(bep) eventually remove
|
||||
return isGo111()
|
||||
}, func(b *sitesBuilder) {
|
||||
b.WithTemplates("home.html", `
|
||||
{{ $var := "Hugo Page" }}
|
||||
{{ if .IsHome }}
|
||||
|
@@ -676,3 +676,7 @@ func dumpPages(pages ...*Page) {
|
||||
func isCI() bool {
|
||||
return os.Getenv("CI") != ""
|
||||
}
|
||||
|
||||
func isGo111() bool {
|
||||
return strings.Contains(runtime.Version(), "1.11")
|
||||
}
|
||||
|
Reference in New Issue
Block a user