diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-27 10:46:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-27 10:46:36 +0000 |
commit | a8b22b4c5bdf9139a187c92b7b9f81bdeaa84888 (patch) | |
tree | 93b8523df3ce9e02e435f56e493bd9b724eb9c7c /tests/test_tokens.py | |
parent | Releasing debian version 11.2.0-1. (diff) | |
download | sqlglot-a8b22b4c5bdf9139a187c92b7b9f81bdeaa84888.tar.xz sqlglot-a8b22b4c5bdf9139a187c92b7b9f81bdeaa84888.zip |
Merging upstream version 11.2.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/test_tokens.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_tokens.py b/tests/test_tokens.py index d30c445..0888555 100644 --- a/tests/test_tokens.py +++ b/tests/test_tokens.py @@ -18,6 +18,18 @@ class TestTokens(unittest.TestCase): for sql, comment in sql_comment: self.assertEqual(tokenizer.tokenize(sql)[0].comments, comment) + def test_token_line(self): + tokens = Tokenizer().tokenize( + """SELECT /* + line break + */ + 'x + y', + x""" + ) + + self.assertEqual(tokens[-1].line, 6) + def test_jinja(self): tokenizer = Tokenizer() @@ -26,6 +38,7 @@ class TestTokens(unittest.TestCase): SELECT {{ x }}, {{- x -}}, + {# it's a comment #} {% for x in y -%} a {{+ b }} {% endfor %}; |