diff options
| -rw-r--r-- | tests/test_format.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_format.py b/tests/test_format.py index de65eae..a430381 100644 --- a/tests/test_format.py +++ b/tests/test_format.py @@ -159,6 +159,16 @@ class TestFormatReindent(TestCaseBase): 'from a,', ' b'])) + def test_identifier_list_with_functions(self): + f = lambda sql: sqlparse.format(sql, reindent=True) + s = ("select 'abc' as foo, coalesce(col1, col2)||col3 as bar," + "col3 from my_table") + self.ndiffAssertEqual(f(s), '\n'.join( + ["select 'abc' as foo,", + " coalesce(col1, col2)||col3 as bar,", + " col3", + "from my_table"])) + def test_case(self): f = lambda sql: sqlparse.format(sql, reindent=True) s = 'case when foo = 1 then 2 when foo = 3 then 4 else 5 end' |
