From 6022f219f1043138d80a821b48b8aab8a0eeeeef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 28 Aug 2018 17:57:42 +0200 Subject: [PATCH] hugolib: Only run variable variable overwrite test on Go 1.11 --- hugolib/resource_chain_test.go | 5 ++++- hugolib/testhelpers_test.go | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/hugolib/resource_chain_test.go b/hugolib/resource_chain_test.go index 9e8991d8..045c9517 100644 --- a/hugolib/resource_chain_test.go +++ b/hugolib/resource_chain_test.go @@ -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 }} diff --git a/hugolib/testhelpers_test.go b/hugolib/testhelpers_test.go index ec84449e..27edf3fd 100644 --- a/hugolib/testhelpers_test.go +++ b/hugolib/testhelpers_test.go @@ -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") +} -- 2.30.2