summaryrefslogtreecommitdiff
path: root/tests/test_tokenize.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_tokenize.py')
-rw-r--r--tests/test_tokenize.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_tokenize.py b/tests/test_tokenize.py
index 2748b1b..1b34342 100644
--- a/tests/test_tokenize.py
+++ b/tests/test_tokenize.py
@@ -205,6 +205,25 @@ def test_parse_order_by():
@pytest.mark.parametrize('s', (
+ "LIKE", "ILIKE", "NOT LIKE", "NOT ILIKE",
+ "NOT LIKE", "NOT ILIKE",
+))
+def test_like_and_ilike_parsed_as_comparisons(s):
+ p = sqlparse.parse(s)[0]
+ assert len(p.tokens) == 1
+ assert p.tokens[0].ttype == T.Operator.Comparison
+
+
+@pytest.mark.parametrize('s', (
+ "LIKEaaa", "bILIKE", "aaILIKEbb", "NOTLIKE", "NOTILIKE",
+))
+def test_near_like_and_ilike_parsed_appropriately(s):
+ p = sqlparse.parse(s)[0]
+ assert len(p.tokens) == 1
+ assert isinstance(p.tokens[0], sql.Identifier)
+
+
+@pytest.mark.parametrize('s', (
'AT TIME ZONE \'UTC\'',
))
def test_parse_tzcast(s):