Instead of just checking that the line of the error message is correct, assert that start and end position are on the correct character offset. Also fix all the tests to conform to this.