summaryrefslogtreecommitdiff
path: root/tests/test_format.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_format.py')
-rw-r--r--tests/test_format.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/test_format.py b/tests/test_format.py
index 9548dc3..dccc3ec 100644
--- a/tests/test_format.py
+++ b/tests/test_format.py
@@ -139,6 +139,32 @@ class TestFormatReindentAligned(TestCaseBase):
' limit 10',
]))
+ def test_joins(self):
+ sql = """
+ select * from a
+ join b on a.one = b.one
+ left join c on c.two = a.two and c.three = a.three
+ full outer join d on d.three = a.three
+ cross join e on e.four = a.four
+ join f using (one, two, three)
+ """
+ self.ndiffAssertEqual(
+ self.formatter(sql),
+ '\n'.join([
+ 'select *',
+ ' from a',
+ ' join b',
+ ' on a.one = b.one',
+ ' left join c',
+ ' on c.two = a.two',
+ ' and c.three = a.three',
+ ' full outer join d',
+ ' on d.three = a.three',
+ ' cross join e',
+ ' on e.four = a.four',
+ ' join f using (one, two, three)',
+ ]))
+
def test_case_statement(self):
sql = """
select a,