summaryrefslogtreecommitdiff
path: root/tests/test_parse.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_parse.py')
-rw-r--r--tests/test_parse.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_parse.py b/tests/test_parse.py
index 513b4be..caba537 100644
--- a/tests/test_parse.py
+++ b/tests/test_parse.py
@@ -132,6 +132,12 @@ def test_parse_nested_function():
assert type(t[0]) is sql.Function
+def test_parse_div_operator():
+ p = sqlparse.parse('col1 DIV 5 AS div_col1')[0].tokens
+ assert p[0].tokens[0].tokens[2].ttype is T.Operator
+ assert p[0].get_alias() == 'div_col1'
+
+
def test_quoted_identifier():
t = sqlparse.parse('select x.y as "z" from foo')[0].tokens
assert isinstance(t[2], sql.Identifier)