hugolib: Adjust test for Go 1.12 - hugo - [fork] hugo port for 9front
 (HTM) git clone git@git.drkhsh.at/hugo.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit b4148cd1d9ea889b81070d3e84a37bd5d23e5746
 (DIR) parent 908692fae5c5840a0db8c7dd389b59dd3b8026b9
 (HTM) 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:
         M hugolib/hugo_sites_build_errors_te… |       3 ++-
       
       1 file changed, 2 insertions(+), 1 deletion(-)
       ---
 (DIR) 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)