summaryrefslogtreecommitdiffstats
path: root/hugolib/testhelpers_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/testhelpers_test.go')
-rw-r--r--hugolib/testhelpers_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/hugolib/testhelpers_test.go b/hugolib/testhelpers_test.go
index 70c9263b3..d37d83ed3 100644
--- a/hugolib/testhelpers_test.go
+++ b/hugolib/testhelpers_test.go
@@ -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 {