diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2010-11-21 19:23:12 +0100 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2010-11-21 19:23:12 +0100 |
| commit | e3a64164683e34a597153005386f9ee53396c6a5 (patch) | |
| tree | f65b858b5d54b3b584985713f5adc265ced33fc1 /tests/test_format.py | |
| parent | 08688ee4fc78fea0a6769cfa8738438c0eb8256d (diff) | |
| download | sqlparse-e3a64164683e34a597153005386f9ee53396c6a5.tar.gz | |
Ignore AND after BETWEEN when reindenting statements (fixes issue14).
Diffstat (limited to 'tests/test_format.py')
| -rw-r--r-- | tests/test_format.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_format.py b/tests/test_format.py index 88693c0..32e8bef 100644 --- a/tests/test_format.py +++ b/tests/test_format.py @@ -104,6 +104,14 @@ class TestFormatReindent(TestCaseBase): 'select *', 'from bar;'])) + def test_keywords_between(self): # issue 14 + # don't break AND after BETWEEN + f = lambda sql: sqlparse.format(sql, reindent=True) + s = 'and foo between 1 and 2 and bar = 3' + self.ndiffAssertEqual(f(s), '\n'.join(['', + 'and foo between 1 and 2', + 'and bar = 3'])) + def test_parenthesis(self): f = lambda sql: sqlparse.format(sql, reindent=True) s = 'select count(*) from (select * from foo);' |
