diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2020-09-30 09:31:40 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2020-09-30 09:31:40 +0200 |
| commit | 990500a149920b02b2b6e5ffe6e747dea7c6739e (patch) | |
| tree | ac08759cd29dc2fa388766c0fbdbb92d9528da59 /tests/test_split.py | |
| parent | cd4a723ee509437166b0f3e0fd62322ecc7bbd99 (diff) | |
| download | sqlparse-990500a149920b02b2b6e5ffe6e747dea7c6739e.tar.gz | |
Fix splitting when using DECLARE ... HANDLER (fixes #581).
Diffstat (limited to 'tests/test_split.py')
| -rw-r--r-- | tests/test_split.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_split.py b/tests/test_split.py index c073298..f69e3d2 100644 --- a/tests/test_split.py +++ b/tests/test_split.py @@ -154,3 +154,9 @@ def test_split_quotes_with_new_line(): stmts = sqlparse.split("select 'foo\n\bar'") assert len(stmts) == 1 assert stmts[0] == "select 'foo\n\bar'" + + +def test_split_mysql_handler_for(load_file): + # see issue581 + stmts = sqlparse.split(load_file('mysql_handler.sql')) + assert len(stmts) == 2 |
