summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2016-05-28 15:07:42 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2016-05-28 15:07:42 +0200
commit16356db18ff6e3206ce08aa50551780bc1b749da (patch)
treeec6d906fe197803febe9ebb0bcf051103da90bfb /tests
parentda3bc9086eb397944cf43632997f75d1404ff34a (diff)
parent233216c3e9528b74ef7c6bc3054d2c0bd048620b (diff)
downloadsqlparse-16356db18ff6e3206ce08aa50551780bc1b749da.tar.gz
Merge pull request #236 from koljonen/using_directly_followed_by_parenthesis
Recognize USING as a keyword in 'USING(', not just in 'USING ('
Diffstat (limited to 'tests')
-rw-r--r--tests/test_grouping.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_grouping.py b/tests/test_grouping.py
index daaec9b..4cc3601 100644
--- a/tests/test_grouping.py
+++ b/tests/test_grouping.py
@@ -380,6 +380,13 @@ def test_begin():
assert isinstance(p.tokens[0], sql.Begin)
+def test_keyword_followed_by_parenthesis():
+ p = sqlparse.parse('USING(somecol')[0]
+ assert len(p.tokens) == 3
+ assert p.tokens[0].ttype == T.Keyword
+ assert p.tokens[1].ttype == T.Punctuation
+
+
def test_nested_begin():
p = sqlparse.parse('BEGIN foo BEGIN bar END END')[0]
assert len(p.tokens) == 1