From 8b5a957f4dad82fda0dc174538fdaf0860a9256a Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Sun, 26 Jul 2015 11:05:58 +0200 Subject: Recognize MSSQL temp tables and distinguish from MySQL comments (fixes #192). --- tests/test_parse.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/test_parse.py') 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) -- cgit v1.2.1