diff options
author | koljonen <koljonen@outlook.com> | 2016-05-24 16:11:36 +0200 |
---|---|---|
committer | koljonen <koljonen@outlook.com> | 2016-05-24 16:11:36 +0200 |
commit | 7f8bd9bbd40cdeaf3e086c992a299f0177e437c7 (patch) | |
tree | 8140429fdc04eced59e4f63f564859353b128704 /tests/test_smart_completion_public_schema_only.py | |
parent | a7cb5e903c75c4d73b072caca104cf300fa6cce6 (diff) |
Make join-condition suggestions work with multi-line queries
Diffstat (limited to 'tests/test_smart_completion_public_schema_only.py')
-rw-r--r-- | tests/test_smart_completion_public_schema_only.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_smart_completion_public_schema_only.py b/tests/test_smart_completion_public_schema_only.py index cacc6912..5bc745f2 100644 --- a/tests/test_smart_completion_public_schema_only.py +++ b/tests/test_smart_completion_public_schema_only.py @@ -532,13 +532,15 @@ def test_join_functions_using_suggests_common_columns(completer, complete_event) Completion(text='y', start_position=0, display_meta='column')]) -def test_join_functions_on_suggests_columns(completer, complete_event): +def test_join_functions_on_suggests_columns_and_join_conditions(completer, complete_event): text = '''SELECT * FROM set_returning_func() f1 INNER JOIN set_returning_func() f2 ON f1.''' pos = len(text) result = set(completer.get_completions( Document(text=text, cursor_position=pos), complete_event)) assert set(result) == set([ + Completion(text='y = f2.y', start_position=0, display_meta='name join'), + Completion(text='x = f2.x', start_position=0, display_meta='name join'), Completion(text='x', start_position=0, display_meta='column'), Completion(text='y', start_position=0, display_meta='column')]) |