From 5ee6aed6aef8f8ffeeef67e3909bf8a72e9213b8 Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Sun, 3 May 2009 21:32:27 +0200 Subject: Improved parsing of identifier lists (targets issue2). --- tests/test_grouping.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') 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] -- cgit v1.2.1