diff options
Diffstat (limited to 'tests/test_split.py')
| -rw-r--r-- | tests/test_split.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_split.py b/tests/test_split.py index 50b3a6b..1995ca5 100644 --- a/tests/test_split.py +++ b/tests/test_split.py @@ -53,6 +53,16 @@ class SQLSplitTest(TestCaseBase): self.assertEqual(len(stmts), 3) self.ndiffAssertEqual(''.join(unicode(q) for q in stmts), sql) + def test_dashcomments_eol(self): + stmts = sqlparse.parse('select foo; -- comment\n') + self.assertEqual(len(stmts), 1) + stmts = sqlparse.parse('select foo; -- comment\r') + self.assertEqual(len(stmts), 1) + stmts = sqlparse.parse('select foo; -- comment\r\n') + self.assertEqual(len(stmts), 1) + stmts = sqlparse.parse('select foo; -- comment') + self.assertEqual(len(stmts), 1) + def test_begintag(self): sql = load_file('begintag.sql') stmts = sqlparse.parse(sql) |
