4 def WebIDLTest(parser
, harness
):
5 # Check that error messages put the '^' in the right place.
12 except WebIDL
.WebIDLError
as e
:
14 lines
= str(e
).split("\n")
16 harness
.check(len(lines
), 3, "Expected number of lines in error message")
17 harness
.check(lines
[1], input, "Second line shows error")
20 " " * (len(input) - 1) + "^",
21 "Correct column pointer in error message",
24 harness
.ok(threw
, "Should have thrown.")