summaryrefslogtreecommitdiffstats
path: root/common/herrors/file_error_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'common/herrors/file_error_test.go')
-rw-r--r--common/herrors/file_error_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/herrors/file_error_test.go b/common/herrors/file_error_test.go
index 0d4e82f66..8b1674ba1 100644
--- a/common/herrors/file_error_test.go
+++ b/common/herrors/file_error_test.go
@@ -38,6 +38,7 @@ func TestToLineNumberError(t *testing.T) {
{errors.New("parse failed: template: _default/bundle-resource-meta.html:11: unexpected in operand"), 0, 11, 1},
{errors.New(`failed:: template: _default/bundle-resource-meta.html:2:7: executing "main" at <.Titles>`), 0, 2, 7},
{errors.New("error in front matter: Near line 32 (last key parsed 'title')"), 0, 32, 1},
+ {errors.New(`failed to load translations: (6, 7): was expecting token =, but got "g" instead`), 0, 6, 7},
} {
got := ToFileErrorWithOffset("template", test.in, test.offset)
@@ -46,7 +47,7 @@ func TestToLineNumberError(t *testing.T) {
le, ok := got.(FileError)
if test.lineNumber > 0 {
- assert.True(ok)
+ assert.True(ok, errMsg)
assert.Equal(test.lineNumber, le.LineNumber(), errMsg)
assert.Equal(test.columnNumber, le.ColumnNumber(), errMsg)
assert.Contains(got.Error(), strconv.Itoa(le.LineNumber()))