summaryrefslogtreecommitdiffstats
path: root/common/herrors/file_error_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-15 11:40:34 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-15 20:25:25 +0200
commitfc9f315d86e1fe51c3d1eec3b60680113b2e3aa6 (patch)
tree69e8ffc4d84e8f02e0e6f098c27cda9dd3bcc544 /common/herrors/file_error_test.go
parent4b189d8fd93d3fa326b31d451d5594c917e6c714 (diff)
Improve SASS errors
Fixes #9897
Diffstat (limited to 'common/herrors/file_error_test.go')
-rw-r--r--common/herrors/file_error_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/herrors/file_error_test.go b/common/herrors/file_error_test.go
index 04baadf16..0b260a255 100644
--- a/common/herrors/file_error_test.go
+++ b/common/herrors/file_error_test.go
@@ -30,7 +30,7 @@ func TestNewFileError(t *testing.T) {
c := qt.New(t)
- fe := NewFileError(errors.New("bar"), "foo.html")
+ fe := NewFileErrorFromName(errors.New("bar"), "foo.html")
c.Assert(fe.Error(), qt.Equals, `"foo.html:1:1": bar`)
lines := ""
@@ -70,7 +70,7 @@ func TestNewFileErrorExtractFromMessage(t *testing.T) {
{errors.New(`execute of template failed: template: index.html:2:5: executing "index.html" at <partial "foo.html" .>: error calling partial: "/layouts/partials/foo.html:3:6": execute of template failed: template: partials/foo.html:3:6: executing "partials/foo.html" at <.ThisDoesNotExist>: can't evaluate field ThisDoesNotExist in type *hugolib.pageStat`), 0, 2, 5},
} {
- got := NewFileError(test.in, "test.txt")
+ got := NewFileErrorFromName(test.in, "test.txt")
errMsg := qt.Commentf("[%d][%T]", i, got)