diff options
| author | Andi Albrecht <andi@lap-pu35.prounix.local> | 2017-03-02 05:37:20 +0100 |
|---|---|---|
| committer | Andi Albrecht <andi@lap-pu35.prounix.local> | 2017-03-02 05:37:20 +0100 |
| commit | 59033cc0ea75e160c87a68de6817cad06888cc38 (patch) | |
| tree | e744c90531788586f2edbeeeb7bdfd1f3843ca55 /tests/test_grouping.py | |
| parent | 0ea7cf49bd329bba28833a7e33c95b131c71a029 (diff) | |
| download | sqlparse-59033cc0ea75e160c87a68de6817cad06888cc38.tar.gz | |
Fix parsing of INTO keyword in WHERE clauses (fixes #324).
Diffstat (limited to 'tests/test_grouping.py')
| -rw-r--r-- | tests/test_grouping.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_grouping.py b/tests/test_grouping.py index 02d211e..72f94f6 100644 --- a/tests/test_grouping.py +++ b/tests/test_grouping.py @@ -210,6 +210,14 @@ def test_returning_kw_ends_where_clause(): assert p.tokens[7].value == 'returning' +def test_into_kw_ends_where_clause(): # issue324 + s = 'select * from foo where a = 1 into baz' + p = sqlparse.parse(s)[0] + assert isinstance(p.tokens[8], sql.Where) + assert p.tokens[9].ttype == T.Keyword + assert p.tokens[9].value == 'into' + + @pytest.mark.parametrize('sql, expected', [ # note: typecast needs to be 2nd token for this test ('select foo::integer from bar', 'integer'), |
