[FAILING] failing verbose error output test
This commit is contained in:
parent
57f1fcd5f1
commit
360103b56a
@ -265,7 +265,15 @@ func TestErrorMessage(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestErrorVerbose(t *testing.T) {
|
func TestErrorVerbose(t *testing.T) {
|
||||||
const expected = `<input>:5:2:parse failed, parsing: string`
|
const expected = `<input>:5:2:parse failed, parsing: string
|
||||||
|
|
||||||
|
"c":3,
|
||||||
|
}<<<
|
||||||
|
|
||||||
|
Parsing error on line: 5, column: 2, while parsing: string. Definition:
|
||||||
|
|
||||||
|
string:nows = "\"" ([^\\"\b\f\n\r\t] | "\\" (["\\/bfnrt] | "u" [0-9a-f]{4}))* "\"";
|
||||||
|
`
|
||||||
|
|
||||||
const doc = `{
|
const doc = `{
|
||||||
"a":1,
|
"a":1,
|
||||||
@ -286,9 +294,9 @@ func TestErrorVerbose(t *testing.T) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if perr.Error() != expected {
|
if perr.Verbose() != expected {
|
||||||
t.Error("failed to get the right error message")
|
t.Error("failed to get the right error message")
|
||||||
t.Log("got: ", perr.Error())
|
t.Log("got: ", perr.Verbose())
|
||||||
t.Log("expected:", expected)
|
t.Log("expected:", expected)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user