summaryrefslogtreecommitdiff
path: root/tests/test_parse.py
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2015-07-26 14:35:32 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2015-07-26 14:35:32 +0200
commit5df394485efbbbc5413b21b9efd6f039ff18fae1 (patch)
tree17a4cd907c79d5e7e75de7cf8c68dbb7dd9f1895 /tests/test_parse.py
parentd463a753216b5c9e2c7f2b3c8a48fa76cbdb73c2 (diff)
parent8987a3a6b540ea35bbb1f9c5f49f3306501289cd (diff)
downloadsqlparse-v0.2.0.tar.gz
Merge branch 'master' into v0.2.0v0.2.0
Diffstat (limited to 'tests/test_parse.py')
-rw-r--r--tests/test_parse.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_parse.py b/tests/test_parse.py
index c953dc2..bbe60df 100644
--- a/tests/test_parse.py
+++ b/tests/test_parse.py
@@ -294,3 +294,13 @@ def test_single_line_comments(sql):
assert p.tokens[-1].ttype == T.Comment.Single
+@pytest.mark.parametrize('sql', [
+ 'foo',
+ '@foo',
+ '#foo', # see issue192
+ '##foo'
+])
+def test_names_and_special_names(sql):
+ p = sqlparse.parse(sql)[0]
+ assert len(p.tokens) == 1
+ assert isinstance(p.tokens[0], sqlparse.sql.Identifier)