Add test case for the tokenizer consuming the character following a question mark

This commit is contained in:
jnlt3 2025-12-14 15:16:05 +03:00
parent d95cef054b
commit 1e2be127da

View file

@ -7914,3 +7914,20 @@ fn parse_create_operator_class() {
)
.is_err());
}
#[test]
fn tokenize_question_mark() {
let sql = "SELECT x ? y";
pg().tokenizes_to(
sql,
vec![
Token::make_keyword("SELECT"),
Token::Whitespace(Whitespace::Space),
Token::make_word("x", None),
Token::Whitespace(Whitespace::Space),
Token::Question,
Token::Whitespace(Whitespace::Space),
Token::make_word("y", None),
],
)
}