diff options
| author | Victor Uriarte <victor.m.uriarte@intel.com> | 2016-06-11 05:05:28 -0700 |
|---|---|---|
| committer | Victor Uriarte <victor.m.uriarte@intel.com> | 2016-06-11 05:05:28 -0700 |
| commit | a958beeab18e4ef4fbde3a1e2e7f9fb35cc6d833 (patch) | |
| tree | c9ae9e11d56642d35e8dba39e03603583873916a | |
| parent | bd48c9bf10facf2769270ad8dfc20b6786c28ab1 (diff) | |
| download | sqlparse-a958beeab18e4ef4fbde3a1e2e7f9fb35cc6d833.tar.gz | |
Add test for issue #207 - run-away indent on alias
| -rw-r--r-- | tests/test_regressions.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_regressions.py b/tests/test_regressions.py index d38b8f1..9f3c9a9 100644 --- a/tests/test_regressions.py +++ b/tests/test_regressions.py @@ -300,3 +300,14 @@ def test_issue227_gettype_cte(): INSERT INTO elsewhere SELECT * FROM foo JOIN bar; ''') assert with2_stmt[0].get_type() == 'INSERT' + + +def test_issue207_runaway_format(): + sql = 'select 1 from (select 1 as one, 2 as two, 3 from dual) t0' + p = sqlparse.format(sql, reindent=True) + assert p == '\n'.join(["select 1", + "from", + " (select 1 as one,", + " 2 as two,", + " 3", + " from dual) t0"]) |
