Adding upstream version 10.0.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
24752785d9
commit
1e860cc299
98 changed files with 4080 additions and 1666 deletions
18
tests/test_tokens.py
Normal file
18
tests/test_tokens.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import unittest
|
||||
|
||||
from sqlglot.tokens import Tokenizer
|
||||
|
||||
|
||||
class TestTokens(unittest.TestCase):
|
||||
def test_comment_attachment(self):
|
||||
tokenizer = Tokenizer()
|
||||
sql_comment = [
|
||||
("/*comment*/ foo", "comment"),
|
||||
("/*comment*/ foo --test", "comment"),
|
||||
("--comment\nfoo --test", "comment"),
|
||||
("foo --comment", "comment"),
|
||||
("foo", None),
|
||||
]
|
||||
|
||||
for sql, comment in sql_comment:
|
||||
self.assertEqual(tokenizer.tokenize(sql)[0].comment, comment)
|
Loading…
Add table
Add a link
Reference in a new issue