mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
parent
b43130115d
commit
dc3f3df29d
1 changed files with 3 additions and 10 deletions
|
@ -3,8 +3,6 @@ package hugolib
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
|
||||||
"runtime"
|
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
@ -212,14 +210,9 @@ func TestSiteBuildErrors(t *testing.T) {
|
||||||
|
|
||||||
assertBuildError: func(a testSiteBuildErrorAsserter, err error) {
|
assertBuildError: func(a testSiteBuildErrorAsserter, err error) {
|
||||||
a.c.Assert(err, qt.Not(qt.IsNil))
|
a.c.Assert(err, qt.Not(qt.IsNil))
|
||||||
// This is fixed in latest Go source
|
fe := a.getFileError(err)
|
||||||
if regexp.MustCompile("devel|12").MatchString(runtime.Version()) {
|
a.c.Assert(fe.Position().LineNumber, qt.Equals, 5)
|
||||||
fe := a.getFileError(err)
|
a.c.Assert(fe.Position().ColumnNumber, qt.Equals, 21)
|
||||||
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`)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue