Tests for Lexer.format_error.