shithub: hugo

Download patch

ref: b4148cd1d9ea889b81070d3e84a37bd5d23e5746
parent: 908692fae5c5840a0db8c7dd389b59dd3b8026b9
author: Bjørn Erik Pedersen <[email protected]>
date: Tue Feb 19 16:47:03 EST 2019

hugolib: Adjust test for Go 1.12

--- a/hugolib/hugo_sites_build_errors_test.go
+++ b/hugolib/hugo_sites_build_errors_test.go
@@ -3,6 +3,7 @@
 import (
 	"fmt"
 	"path/filepath"
+	"regexp"
 	"runtime"
 	"strings"
 	"testing"
@@ -211,7 +212,7 @@
 			assertBuildError: func(a testSiteBuildErrorAsserter, err error) {
 				assert.Error(err)
 				// This is fixed in latest Go source
-				if strings.Contains(runtime.Version(), "devel") {
+				if regexp.MustCompile("devel|12").MatchString(runtime.Version()) {
 					fe := a.getFileError(err)
 					assert.Equal(5, fe.Position().LineNumber)
 					assert.Equal(21, fe.Position().ColumnNumber)