summaryrefslogtreecommitdiffstats
path: root/tests/test_smart_completion_public_schema_only.py
diff options
context:
space:
mode:
authorDarik Gamble <darik.gamble.spam@gmail.com>2015-11-20 19:21:56 -0500
committerDarik Gamble <darik.gamble.spam@gmail.com>2015-11-21 16:39:30 -0500
commit9295cb9686f6255df9f5869481732727a66a9461 (patch)
treef88497a12c255a1f1549e4a5b032127e77d423cb /tests/test_smart_completion_public_schema_only.py
parent2df5ed599e27ad6683be1b64f794ee9860d600ac (diff)
Fix suggestions after a manually entered double quote escape
Diffstat (limited to 'tests/test_smart_completion_public_schema_only.py')
-rw-r--r--tests/test_smart_completion_public_schema_only.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_smart_completion_public_schema_only.py b/tests/test_smart_completion_public_schema_only.py
index 96bc1266..409dabe2 100644
--- a/tests/test_smart_completion_public_schema_only.py
+++ b/tests/test_smart_completion_public_schema_only.py
@@ -386,6 +386,17 @@ def test_auto_escaped_col_names(completer, complete_event):
)
+def test_allow_leading_double_quote_in_last_word(completer, complete_event):
+ text = 'SELECT * from "sele'
+ position = len(text)
+ result = completer.get_completions(
+ Document(text=text, cursor_position=position), complete_event)
+
+ expected = Completion(text='"select"', start_position=-5, display_meta='table')
+
+ assert expected in set(result)
+
+
@pytest.mark.parametrize('text', [
'SELECT 1::',
'CREATE TABLE foo (bar ',