diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2011-09-27 12:44:33 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2011-09-27 12:44:33 +0200 |
| commit | 4b9261f4076befecbc4757c21ed0b268df546f96 (patch) | |
| tree | 48ec872e2a810a8915360583ca5f81a095ff0455 /tests/test_format.py | |
| parent | 3bf54c10f0742e3afc75dcaa4623397097beadc5 (diff) | |
| download | sqlparse-4b9261f4076befecbc4757c21ed0b268df546f96.tar.gz | |
Choose first token during identifier grouping when both names/symbols and functions are found (fixes issue45).
Diffstat (limited to 'tests/test_format.py')
| -rw-r--r-- | tests/test_format.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_format.py b/tests/test_format.py index e41b6b6..7a2c655 100644 --- a/tests/test_format.py +++ b/tests/test_format.py @@ -228,7 +228,12 @@ class TestFormatReindent(TestCaseBase): ' foo,', ' bar'])) - + def test_identifier_and_functions(self): # issue45 + f = lambda sql: sqlparse.format(sql, reindent=True) + s = 'select foo.bar, nvl(1) from dual' + self.ndiffAssertEqual(f(s), '\n'.join(['select foo.bar,', + ' nvl(1)', + 'from dual'])) class TestOutputFormat(TestCaseBase): |
