summaryrefslogtreecommitdiffstats
path: root/tests/test_smart_completion_public_schema_only.py
diff options
context:
space:
mode:
authorDarik Gamble <darik.gamble@gmail.com>2017-02-25 08:40:52 -0500
committerDarik Gamble <darik.gamble@gmail.com>2017-02-25 09:01:11 -0500
commitf314f8301b9f481f8168cb5163205e6dda40a070 (patch)
tree8cb74ae84ef3857081eb0258c282835eee5182c9 /tests/test_smart_completion_public_schema_only.py
parente574f48e165272750efd27b8b10909bc2f3e1c48 (diff)
Suggest keywords after ALTER
Diffstat (limited to 'tests/test_smart_completion_public_schema_only.py')
-rw-r--r--tests/test_smart_completion_public_schema_only.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_smart_completion_public_schema_only.py b/tests/test_smart_completion_public_schema_only.py
index 6c7c7b43..9cac1435 100644
--- a/tests/test_smart_completion_public_schema_only.py
+++ b/tests/test_smart_completion_public_schema_only.py
@@ -999,3 +999,10 @@ def test_keyword_casing_upper(keyword_casing, expected, texts):
Document(text=text, cursor_position=len(text)), complete_event)
assert expected in [cpl.text for cpl in completions]
+
+def test_keyword_after_alter(completer):
+ sql = 'ALTER TABLE users ALTER '
+ expected = Completion('COLUMN', start_position=0, display_meta='keyword')
+ completions = completer.get_completions(
+ Document(text=sql, cursor_position=len(sql)), complete_event)
+ assert expected in set(completions)