WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 1e2be12

Browse files
committed
Add test case for the tokenizer consuming the character following a question mark
1 parent d95cef0 commit 1e2be12

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/sqlparser_postgres.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7914,3 +7914,20 @@ fn parse_create_operator_class() {
79147914
)
79157915
.is_err());
79167916
}
7917+
7918+
#[test]
7919+
fn tokenize_question_mark() {
7920+
let sql = "SELECT x ? y";
7921+
pg().tokenizes_to(
7922+
sql,
7923+
vec![
7924+
Token::make_keyword("SELECT"),
7925+
Token::Whitespace(Whitespace::Space),
7926+
Token::make_word("x", None),
7927+
Token::Whitespace(Whitespace::Space),
7928+
Token::Question,
7929+
Token::Whitespace(Whitespace::Space),
7930+
Token::make_word("y", None),
7931+
],
7932+
)
7933+
}

0 commit comments

Comments
 (0)