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.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_tokens.py b/tests/test_tokens.py
index 970c1ac..29ef5b6 100644
--- a/tests/test_tokens.py
+++ b/tests/test_tokens.py
@@ -85,6 +85,18 @@ x"""
],
)
+ for simple_query in ("SELECT 1\r\n", "\r\nSELECT 1"):
+ tokens = Tokenizer().tokenize(simple_query)
+ tokens = [(token.token_type, token.text) for token in tokens]
+
+ self.assertEqual(
+ tokens,
+ [
+ (TokenType.SELECT, "SELECT"),
+ (TokenType.NUMBER, "1"),
+ ],
+ )
+
def test_command(self):
tokens = Tokenizer().tokenize("SHOW;")
self.assertEqual(tokens[0].token_type, TokenType.SHOW)