summaryrefslogtreecommitdiff
path: root/tests/test_regressions.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_regressions.py')
-rw-r--r--tests/test_regressions.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_regressions.py b/tests/test_regressions.py
index e9d890b..423f2d6 100644
--- a/tests/test_regressions.py
+++ b/tests/test_regressions.py
@@ -198,3 +198,23 @@ def test_format_accepts_encoding(): # issue20
else:
tformatted = 'insert into foo\nvalues (1); -- Песня про надежду\n'
assert formatted == tformatted
+
+
+def test_issue90():
+ sql = ('UPDATE "gallery_photo" SET "owner_id" = 4018, "deleted_at" = NULL,'
+ ' "width" = NULL, "height" = NULL, "rating_votes" = 0,'
+ ' "rating_score" = 0, "thumbnail_width" = NULL,'
+ ' "thumbnail_height" = NULL, "price" = 1, "description" = NULL')
+ formatted = sqlparse.format(sql, reindent=True)
+ tformatted = '\n'.join(['UPDATE "gallery_photo"',
+ 'SET "owner_id" = 4018,',
+ ' "deleted_at" = NULL,',
+ ' "width" = NULL,',
+ ' "height" = NULL,',
+ ' "rating_votes" = 0,',
+ ' "rating_score" = 0,',
+ ' "thumbnail_width" = NULL,',
+ ' "thumbnail_height" = NULL,',
+ ' "price" = 1,',
+ ' "description" = NULL'])
+ assert formatted == tformatted