diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2014-03-03 07:55:06 +0100 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2014-03-03 07:55:06 +0100 |
| commit | e6d86edf4454153c655ba548b5698a4dbe5a10fd (patch) | |
| tree | 7319c7bdffffcc83946d6ba2312e7ea33947f233 /tests | |
| parent | fcf41c86cd0f1370a5f77ffa83334c803e82157f (diff) | |
| download | sqlparse-e6d86edf4454153c655ba548b5698a4dbe5a10fd.tar.gz | |
Improve handling of NULL in aliased identifiers.
Diffstat (limited to 'tests')
| -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 395c2b6..e30ddf0 100644 --- a/tests/test_regressions.py +++ b/tests/test_regressions.py @@ -233,3 +233,14 @@ def test_except_formatting(): 'WHERE 1 = 2' ]) assert formatted == tformatted + + +def test_null_with_as(): + sql = 'SELECT NULL AS c1, NULL AS c2 FROM t1' + formatted = sqlparse.format(sql, reindent=True) + tformatted = '\n'.join([ + 'SELECT NULL AS c1,', + ' NULL AS c2', + 'FROM t1' + ]) + assert formatted == tformatted
\ No newline at end of file |
