hugolib: Only run variable variable overwrite test on Go 1.11

This commit is contained in:
Bjørn Erik Pedersen committed 2018-08-28 18:00:19 +02:00
1 parent 0c8a415483
commit 6022f219f1
2 files changed
+8 -1

No files matched your search

+4 -1
View File
@@ -257,7 +257,10 @@ T2: Content: {{ $combinedText.Content }}|{{ $combinedText.RelPermalink }}
b.AssertFileContent("public/rocks/hugo.txt", "Hugo Rocks!") 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", ` b.WithTemplates("home.html", `
{{ $var := "Hugo Page" }} {{ $var := "Hugo Page" }}
{{ if .IsHome }} {{ if .IsHome }}
+4
View File
@@ -676,3 +676,7 @@ func dumpPages(pages ...*Page) {
func isCI() bool { func isCI() bool {
return os.Getenv("CI") != "" return os.Getenv("CI") != ""
} }
func isGo111() bool {
return strings.Contains(runtime.Version(), "1.11")
}