Skip to content

Commit ff8d598

Browse files
committed
Add regression test for andialbrecht#484.
1 parent 6ce2268 commit ff8d598

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

tests/test_regressions.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,3 +373,20 @@ def test_issue469_copy_as_psql_command():
373373
'\\copy select * from foo',
374374
keyword_case='upper', identifier_case='capitalize')
375375
assert formatted == '\\copy SELECT * FROM Foo'
376+
377+
378+
@pytest.mark.xfail(reason='Needs to be fixed')
379+
def test_issue484_comments_and_newlines():
380+
formatted = sqlparse.format('\n'.join([
381+
'Create table myTable',
382+
'(',
383+
' myId TINYINT NOT NULL, --my special comment',
384+
' myName VARCHAR2(100) NOT NULL',
385+
')']),
386+
strip_comments=True)
387+
assert formatted == ('\n'.join([
388+
'Create table myTable',
389+
'(',
390+
' myId TINYINT NOT NULL,',
391+
' myName VARCHAR2(100) NOT NULL',
392+
')']))

0 commit comments

Comments
 (0)