1
0
Fork 0

Adding upstream version 18.2.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 20:56:33 +01:00
parent 9de781a59b
commit ab14e550ff
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
124 changed files with 60313 additions and 50346 deletions

View file

@ -6,6 +6,18 @@ from sqlglot.tokens import Tokenizer, TokenType
class TestTokens(unittest.TestCase):
def test_space_keywords(self):
for string, length in (
("group bys", 2),
(" group bys", 2),
(" group bys ", 2),
("group by)", 2),
("group bys)", 3),
):
tokens = Tokenizer().tokenize(string)
self.assertTrue("GROUP" in tokens[0].text.upper())
self.assertEqual(len(tokens), length)
def test_comment_attachment(self):
tokenizer = Tokenizer()
sql_comment = [