hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit b4148cd1d9ea889b81070d3e84a37bd5d23e5746
parent 908692fae5c5840a0db8c7dd389b59dd3b8026b9
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Tue, 19 Feb 2019 21:47:03 +0100

hugolib: Adjust test for Go 1.12

Diffstat:
Mhugolib/hugo_sites_build_errors_test.go | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hugolib/hugo_sites_build_errors_test.go b/hugolib/hugo_sites_build_errors_test.go
@@ -3,6 +3,7 @@ package hugolib
 import (
 	"fmt"
 	"path/filepath"
+	"regexp"
 	"runtime"
 	"strings"
 	"testing"
@@ -211,7 +212,7 @@ func TestSiteBuildErrors(t *testing.T) {
 			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)