hugolib: Only run variable variable overwrite test on Go 1.11
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 28 Aug 2018 15:57:42 +0000 (17:57 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 28 Aug 2018 16:00:19 +0000 (18:00 +0200)
hugolib/resource_chain_test.go
hugolib/testhelpers_test.go

index 9e8991d8d1a93b2a1d2fd2282a201e41d08d0c3e..045c9517a4bd3fb11cc1f167db01eb0f611dab25 100644 (file)
@@ -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 }}
index ec84449ec30485b97875bd3383add7ca576589b7..27edf3fdd6baddf3083d9535a8216baba5d3ee5a 100644 (file)
@@ -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")
+}