summaryrefslogtreecommitdiff
path: root/tests/test_split.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_split.py')
-rw-r--r--tests/test_split.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_split.py b/tests/test_split.py
index 1995ca5..a794b76 100644
--- a/tests/test_split.py
+++ b/tests/test_split.py
@@ -103,3 +103,10 @@ class SQLSplitTest(TestCaseBase):
'SELECT 2;')
stmts = sqlparse.split(sql)
self.assertEqual(len(stmts), 2)
+
+ def test_if_function(self): # see issue 33
+ # don't let IF as a function confuse the splitter
+ sql = ('CREATE TEMPORARY TABLE tmp SELECT IF(a=1, a, b) AS o FROM one; '
+ 'SELECT t FROM two')
+ stmts = sqlparse.split(sql)
+ self.assertEqual(len(stmts), 2)