summaryrefslogtreecommitdiff
path: root/tests/test_format.py
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2011-07-24 00:56:18 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2011-07-24 00:56:18 +0200
commit16dbc49a3fb4928365550775efa925640b4cb768 (patch)
tree76576aac1ea3c3e61556b4bf01b3840b2d4925b7 /tests/test_format.py
parent693d7a31c1fff960763ff3ba485142ce67ff708f (diff)
downloadsqlparse-16dbc49a3fb4928365550775efa925640b4cb768.tar.gz
Releax keyword detection, when keywords are used as function names (fixes issue36).
Diffstat (limited to 'tests/test_format.py')
-rw-r--r--tests/test_format.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_format.py b/tests/test_format.py
index f9740d5..e41b6b6 100644
--- a/tests/test_format.py
+++ b/tests/test_format.py
@@ -221,6 +221,13 @@ class TestFormatReindent(TestCaseBase):
'where (c1 = 1)',
'order by c1']))
+ def test_keywordfunctions(self): # issue36
+ f = lambda sql: sqlparse.format(sql, reindent=True)
+ s = 'select max(a) b, foo, bar'
+ self.ndiffAssertEqual(f(s), '\n'.join(['select max(a) b,',
+ ' foo,',
+ ' bar']))
+