summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2010-11-21 12:43:06 +0100
committerAndi Albrecht <albrecht.andi@gmail.com>2010-11-21 12:43:06 +0100
commit98b3c40f1c91b4a620a53fabfdbb8100bada15e8 (patch)
tree1970558b9a5b751cf5bff40234a4c5068f41d05b /tests
parent16b9b09222313e6cf45cd4daa313fd0f951f6a94 (diff)
downloadsqlparse-98b3c40f1c91b4a620a53fabfdbb8100bada15e8.tar.gz
Group extended identifiers (fixes issue15).
Diffstat (limited to 'tests')
-rw-r--r--tests/test_grouping.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_grouping.py b/tests/test_grouping.py
index 120c7cf..c6f3679 100644
--- a/tests/test_grouping.py
+++ b/tests/test_grouping.py
@@ -88,6 +88,14 @@ class TestGrouping(TestCaseBase):
self.assert_(isinstance(p.tokens[0], sql.Identifier))
self.assert_(isinstance(p.tokens[0].tokens[0], sql.Function))
+ def test_identifier_extended(self): # issue 15
+ p = sqlparse.parse('foo+100')[0]
+ self.assert_(isinstance(p.tokens[0], sql.Identifier))
+ p = sqlparse.parse('foo + 100')[0]
+ self.assert_(isinstance(p.tokens[0], sql.Identifier))
+ p = sqlparse.parse('foo*100')[0]
+ self.assert_(isinstance(p.tokens[0], sql.Identifier))
+
def test_identifier_list(self):
p = sqlparse.parse('a, b, c')[0]
self.assert_(isinstance(p.tokens[0], sql.IdentifierList))