hugolib: Continue the file context/line number errors work

See #5324
This commit is contained in:
Bjørn Erik Pedersen
2018-10-21 12:20:21 +02:00
parent 7930d2132a
commit d1661b823a
23 changed files with 444 additions and 236 deletions

View File

@@ -465,12 +465,16 @@ func (s *sitesBuilder) Fatalf(format string, args ...interface{}) {
}
func Fatalf(t testing.TB, format string, args ...interface{}) {
trace := strings.Join(assert.CallerInfo(), "\n\r\t\t\t")
trace := trace()
format = format + "\n%s"
args = append(args, trace)
t.Fatalf(format, args...)
}
func trace() string {
return strings.Join(assert.CallerInfo(), "\n\r\t\t\t")
}
func (s *sitesBuilder) AssertFileContent(filename string, matches ...string) {
content := readDestination(s.T, s.Fs, filename)
for _, match := range matches {