summaryrefslogtreecommitdiff
path: root/tests/test_split.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_split.py')
-rw-r--r--tests/test_split.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_split.py b/tests/test_split.py
index 8214756..c073298 100644
--- a/tests/test_split.py
+++ b/tests/test_split.py
@@ -139,6 +139,13 @@ def test_split_simple():
assert stmts[1] == 'select * from bar;'
+def test_split_ignores_empty_newlines():
+ stmts = sqlparse.split('select foo;\nselect bar;\n')
+ assert len(stmts) == 2
+ assert stmts[0] == 'select foo;'
+ assert stmts[1] == 'select bar;'
+
+
def test_split_quotes_with_new_line():
stmts = sqlparse.split('select "foo\nbar"')
assert len(stmts) == 1