summaryrefslogtreecommitdiff
path: root/tests/test_parse.py
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2012-11-03 13:05:25 +0100
committerAndi Albrecht <albrecht.andi@gmail.com>2012-11-03 13:05:25 +0100
commit39ddba76709cc36dda0e9519efe7316d5ff5f12f (patch)
tree93a62f9a1626077ba4c558e442a67be7e7ea39e2 /tests/test_parse.py
parent813782f5f842023c5dcc9658f27f957ca83955eb (diff)
downloadsqlparse-39ddba76709cc36dda0e9519efe7316d5ff5f12f.tar.gz
Improve handling of quoted indentifiers (fixes issue78).
Diffstat (limited to 'tests/test_parse.py')
-rw-r--r--tests/test_parse.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_parse.py b/tests/test_parse.py
index e14c9e2..05141a4 100644
--- a/tests/test_parse.py
+++ b/tests/test_parse.py
@@ -106,3 +106,10 @@ class SQLParseTest(TestCaseBase):
t = sqlparse.parse('foo.key')[0].tokens
self.assertEqual(len(t), 1)
self.assert_(isinstance(t[0], sqlparse.sql.Identifier))
+
+
+def test_quoted_identifier():
+ t = sqlparse.parse('select x.y as "z" from foo')[0].tokens
+ assert isinstance(t[2], sqlparse.sql.Identifier)
+ assert t[2].get_name() == 'z'
+ assert t[2].get_real_name() == 'y'