summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVictor Uriarte <victor.m.uriarte@intel.com>2016-06-11 05:15:23 -0700
committerVictor Uriarte <victor.m.uriarte@intel.com>2016-06-11 05:19:17 -0700
commit1fd3da42bd55bfc1e916e3c3f301f0364b0ded21 (patch)
tree77fd5be087ae64c4416c0bd775f6c1843b45a007 /tests
parenta958beeab18e4ef4fbde3a1e2e7f9fb35cc6d833 (diff)
downloadsqlparse-1fd3da42bd55bfc1e916e3c3f301f0364b0ded21.tar.gz
Test for wildcards vs multiplication tokens
Diffstat (limited to 'tests')
-rw-r--r--tests/test_parse.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_parse.py b/tests/test_parse.py
index 8ada05c..8654ec4 100644
--- a/tests/test_parse.py
+++ b/tests/test_parse.py
@@ -334,3 +334,14 @@ def test_pprint():
"",
])
assert output.getvalue() == pprint
+
+
+def test_wildcard_multiplication():
+ p = sqlparse.parse('select * from dual')[0]
+ assert p.tokens[2].ttype == T.Wildcard
+
+ p = sqlparse.parse('select a0.* from dual a0')[0]
+ assert p.tokens[2][2].ttype == T.Wildcard
+
+ p = sqlparse.parse('select 1 * 2 from dual')[0]
+ assert p.tokens[2][2].ttype == T.Operator