diff options
| author | Victor Uriarte <victor.m.uriarte@intel.com> | 2016-06-08 09:58:54 -0700 |
|---|---|---|
| committer | Victor Uriarte <victor.m.uriarte@intel.com> | 2016-06-11 09:34:31 -0700 |
| commit | 99897920d77148981e91ec1b2ba25370567ef6d7 (patch) | |
| tree | 7c2e25f1392c97b4512b4dffc1b058f72a1a5b64 /tests | |
| parent | 751933d3abdce2234bd869ee65a1ebc7ccbf6b53 (diff) | |
| download | sqlparse-99897920d77148981e91ec1b2ba25370567ef6d7.tar.gz | |
Fix grouping of `case` within parenthesis.
Closes #164
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_regressions.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_regressions.py b/tests/test_regressions.py index 9f3c9a9..4eb1621 100644 --- a/tests/test_regressions.py +++ b/tests/test_regressions.py @@ -311,3 +311,10 @@ def test_issue207_runaway_format(): " 2 as two,", " 3", " from dual) t0"]) + + +def test_case_within_parenthesis(): + # see issue #164 + s = '(case when 1=1 then 2 else 5 end)' + p = sqlparse.parse(s)[0] + assert isinstance(p[0][1], sql.Case) |
