From ee2cbfea194fac4f2bbfe526fe2c3bdb856aed0b Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Mon, 26 Sep 2016 13:03:42 +0200 Subject: Fix parsing of UNION ALL (fixes #294). --- tests/test_tokenize.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/test_tokenize.py b/tests/test_tokenize.py index 22cb90f..b548541 100644 --- a/tests/test_tokenize.py +++ b/tests/test_tokenize.py @@ -157,6 +157,12 @@ def test_parse_join(expr): assert p.tokens[0].ttype is T.Keyword +def test_parse_union(): # issue294 + p = sqlparse.parse('UNION ALL')[0] + assert len(p.tokens) == 1 + assert p.tokens[0].ttype is T.Keyword + + @pytest.mark.parametrize('s', ['END IF', 'END IF', 'END\t\nIF', 'END LOOP', 'END LOOP', 'END\t\nLOOP']) def test_parse_endifloop(s): -- cgit v1.2.1