1
0
Fork 0

Adding upstream version 20.3.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 21:17:33 +01:00
parent 5bd573dda1
commit fd9de5e4cb
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
132 changed files with 55125 additions and 51576 deletions

View file

@ -71,6 +71,20 @@ x"""
self.assertEqual(tokens[2].line, 2)
self.assertEqual(tokens[3].line, 3)
def test_crlf(self):
tokens = Tokenizer().tokenize("SELECT a\r\nFROM b")
tokens = [(token.token_type, token.text) for token in tokens]
self.assertEqual(
tokens,
[
(TokenType.SELECT, "SELECT"),
(TokenType.VAR, "a"),
(TokenType.FROM, "FROM"),
(TokenType.VAR, "b"),
],
)
def test_command(self):
tokens = Tokenizer().tokenize("SHOW;")
self.assertEqual(tokens[0].token_type, TokenType.SHOW)