summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2019-03-30 15:29:00 +0100
committerAndi Albrecht <albrecht.andi@gmail.com>2019-03-30 15:29:24 +0100
commitff8d5982e83bab7023ffc6f3380cb9901be3443a (patch)
tree6e05f8be0279820157f61315aa908a5dc408bfad
parent6ce226846b40aa60a1a2ea84892046bca65f1f83 (diff)
downloadsqlparse-ff8d5982e83bab7023ffc6f3380cb9901be3443a.tar.gz
Add regression test for #484.
-rw-r--r--tests/test_regressions.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_regressions.py b/tests/test_regressions.py
index 1d52ea7..8b2cb48 100644
--- a/tests/test_regressions.py
+++ b/tests/test_regressions.py
@@ -373,3 +373,20 @@ def test_issue469_copy_as_psql_command():
'\\copy select * from foo',
keyword_case='upper', identifier_case='capitalize')
assert formatted == '\\copy SELECT * FROM Foo'
+
+
+@pytest.mark.xfail(reason='Needs to be fixed')
+def test_issue484_comments_and_newlines():
+ formatted = sqlparse.format('\n'.join([
+ 'Create table myTable',
+ '(',
+ ' myId TINYINT NOT NULL, --my special comment',
+ ' myName VARCHAR2(100) NOT NULL',
+ ')']),
+ strip_comments=True)
+ assert formatted == ('\n'.join([
+ 'Create table myTable',
+ '(',
+ ' myId TINYINT NOT NULL,',
+ ' myName VARCHAR2(100) NOT NULL',
+ ')']))