diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2013-05-15 08:14:12 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2013-05-15 08:14:12 +0200 |
| commit | abbcdcf9e135cb3f432041caa434cedd7048d788 (patch) | |
| tree | 6facdbf58f8ce231ae5007d0298c89f69ce130ce /tests/test_split.py | |
| parent | 8e5036120f79e8628bd3c493bc4815bbcc8427b1 (diff) | |
| download | sqlparse-abbcdcf9e135cb3f432041caa434cedd7048d788.tar.gz | |
Strip leading and trailing whitespaces from splitted statements.
Diffstat (limited to 'tests/test_split.py')
| -rw-r--r-- | tests/test_split.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_split.py b/tests/test_split.py index f0b6dda..e4ebf7e 100644 --- a/tests/test_split.py +++ b/tests/test_split.py @@ -131,3 +131,10 @@ class SQLSplitTest(TestCaseBase): stream = StringIO("SELECT 1; SELECT 2;") stmts = list(sqlparse.parsestream(stream)) self.assertEqual(type(stmts[0].tokens[0].value), unicode) + + +def test_split_simple(): + stmts = sqlparse.split('select * from foo; select * from bar;') + assert len(stmts) == 2 + assert stmts[0] == 'select * from foo;' + assert stmts[1] == 'select * from bar;' |
