Skip to content

Commit

Permalink
Add test case for issue 214, update changelog and authors.
Browse files Browse the repository at this point in the history
  • Loading branch information
andialbrecht committed Dec 14, 2015
1 parent ac3fdfd commit 38a1489
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Alphabetical list of contributors:
* Robert Nix <com.github@rnix.org>
* Rocky Meza <rmeza@fusionbox.com>
* Ryan Wooden <rygwdn@gmail.com>
* Shen Longxing <shenlongxing2012@gmail.com>
* spigwitmer <itgpmc@gmail.com>
* Tim Graham <timograham@gmail.com>
* Victor Hahn <info@victor-hahn.de>
Expand Down
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Internal Changes
sqlparse.exceptions.
* sqlparse.sql.Token.to_unicode was removed.

Bug Fixes
* Leading whitespaces are now removed when format() is called with
strip_whitespace=True (issue213, by shenlongxing).


Release 0.1.18 (Oct 25, 2015)
-----------------------------
Expand Down
5 changes: 5 additions & 0 deletions tests/test_regressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,8 @@ def test_issue212_py2unicode():
t2 = sql.Token(T.String, u"bug")
l = sql.TokenList([t1, t2])
assert str(l) == 'schöner bug'


def test_issue213_leadingws():
sql = " select * from foo"
assert sqlparse.format(sql, strip_whitespace=True) == "select * from foo"

0 comments on commit 38a1489

Please sign in to comment.