diff options
Diffstat (limited to 'tests/test_smart_completion_public_schema_only.py')
-rw-r--r-- | tests/test_smart_completion_public_schema_only.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_smart_completion_public_schema_only.py b/tests/test_smart_completion_public_schema_only.py index c1d65ab5..dab64757 100644 --- a/tests/test_smart_completion_public_schema_only.py +++ b/tests/test_smart_completion_public_schema_only.py @@ -914,3 +914,18 @@ def test_cte_qualified_columns(completer, complete_event, text): complete_event) expected = [Completion('foo', 0, display_meta='column')] assert set(expected) == set(result) + + +@pytest.mark.parametrize('keyword_casing,expected,texts', [ + ('upper', 'SELECT', ('', 's', 'S', 'Sel')), + ('lower', 'select', ('', 's', 'S', 'Sel')), + ('auto', 'SELECT', ('', 'S', 'SEL', 'seL')), + ('auto', 'select', ('s', 'sel', 'SEl')), +]) +def test_keyword_casing_upper(keyword_casing, expected, texts): + for text in texts: + completer_ = testdata.get_completer({'keyword_casing': keyword_casing}) + completions = completer_.get_completions( + Document(text=text, cursor_position=len(text)), complete_event) + assert expected in [cpl.text for cpl in completions] + |