summaryrefslogtreecommitdiff
path: root/tests/test_parse.py
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2015-07-26 11:05:58 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2015-07-26 11:05:58 +0200
commit8b5a957f4dad82fda0dc174538fdaf0860a9256a (patch)
tree282cd4a60f32b886f63e5adc0857b3e6bca07843 /tests/test_parse.py
parentc66fbacf8b3095c6de264657362e403920edace2 (diff)
downloadsqlparse-8b5a957f4dad82fda0dc174538fdaf0860a9256a.tar.gz
Recognize MSSQL temp tables and distinguish from MySQL comments (fixes #192).
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 857685b..6c9d6a6 100644
--- a/tests/test_parse.py
+++ b/tests/test_parse.py
@@ -293,3 +293,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)