diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2015-12-14 19:18:26 +0100 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2015-12-14 19:18:26 +0100 |
| commit | 38a14896e503d0946e622931923fb1350fa29ffd (patch) | |
| tree | 51448877610a28fe158cce7ac6635a842ed428d7 | |
| parent | ac3fdfd2714b275e6def5ec2cf8bf92cabe56b60 (diff) | |
| download | sqlparse-38a14896e503d0946e622931923fb1350fa29ffd.tar.gz | |
Add test case for issue 214, update changelog and authors.
| -rw-r--r-- | AUTHORS | 1 | ||||
| -rw-r--r-- | CHANGES | 4 | ||||
| -rw-r--r-- | tests/test_regressions.py | 5 |
3 files changed, 10 insertions, 0 deletions
@@ -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> @@ -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) ----------------------------- diff --git a/tests/test_regressions.py b/tests/test_regressions.py index 50592c5..ca7dd5b 100644 --- a/tests/test_regressions.py +++ b/tests/test_regressions.py @@ -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" |
