Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-09-04 10:50:32 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-09-04 10:50:32 +0300
commitdc3f3df29d2b65532cedc9d321db7c4a38a28d7d (patch)
tree2ebf39842e1e548eb890045cf0b736e2f752f173 /hugolib
parentb43130115d9e3888d94df9e6f5fc72eba662632f (diff)
hugolib: Adjust Go version specific test
See #6304
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/hugo_sites_build_errors_test.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/hugolib/hugo_sites_build_errors_test.go b/hugolib/hugo_sites_build_errors_test.go
index 6c9c8b089..21b745ccd 100644
--- a/hugolib/hugo_sites_build_errors_test.go
+++ b/hugolib/hugo_sites_build_errors_test.go
@@ -3,8 +3,6 @@ package hugolib
import (
"fmt"
"path/filepath"
- "regexp"
- "runtime"
"strings"
"testing"
"time"
@@ -212,14 +210,9 @@ func TestSiteBuildErrors(t *testing.T) {
assertBuildError: func(a testSiteBuildErrorAsserter, err error) {
a.c.Assert(err, qt.Not(qt.IsNil))
- // This is fixed in latest Go source
- if regexp.MustCompile("devel|12").MatchString(runtime.Version()) {
- fe := a.getFileError(err)
- a.c.Assert(fe.Position().LineNumber, qt.Equals, 5)
- a.c.Assert(fe.Position().ColumnNumber, qt.Equals, 21)
- } else {
- a.c.Assert(err.Error(), qt.Contains, `execute of template failed: panic in Execute`)
- }
+ fe := a.getFileError(err)
+ a.c.Assert(fe.Position().LineNumber, qt.Equals, 5)
+ a.c.Assert(fe.Position().ColumnNumber, qt.Equals, 21)
},
},
}