summaryrefslogtreecommitdiffstats
path: root/tests/test_tokens.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_tokens.py')
-rw-r--r--tests/test_tokens.py13
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 %};