summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2009-05-03 21:32:27 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2009-05-03 21:32:27 +0200
commit5ee6aed6aef8f8ffeeef67e3909bf8a72e9213b8 (patch)
tree27d8f5ac36ed9300407ba7bbeaf433abdf7617ed /tests
parent118d6bb96a03003460d2cea1af74f2b362458037 (diff)
downloadsqlparse-5ee6aed6aef8f8ffeeef67e3909bf8a72e9213b8.tar.gz
Improved parsing of identifier lists (targets issue2).
Diffstat (limited to 'tests')
-rw-r--r--tests/test_grouping.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_grouping.py b/tests/test_grouping.py
index 3c32b18..6ec6616 100644
--- a/tests/test_grouping.py
+++ b/tests/test_grouping.py
@@ -75,6 +75,12 @@ class TestGrouping(TestCaseBase):
p = sqlparse.parse('(a, case when 1 then 2 else 3 end as b, c)')[0]
self.assert_(isinstance(p.tokens[0].tokens[1], IdentifierList))
+ def test_identifier_list_other(self): # issue2
+ p = sqlparse.parse("select *, null, 1, 'foo', bar from mytable, x")[0]
+ self.assert_(isinstance(p.tokens[2], IdentifierList))
+ l = p.tokens[2]
+ self.assertEqual(len(l.tokens), 13)
+
def test_where(self):
s = 'select * from foo where bar = 1 order by id desc'
p = sqlparse.parse(s)[0]