Add a test for handling missing detail keys for LSP completion

This commit is contained in:
w0rp 2018-06-11 21:37:50 +01:00
parent d9746a4572
commit 87455a2ef4
No known key found for this signature in database
GPG key ID: 0FC1ECAA8C81CD83

View file

@ -429,3 +429,23 @@ Execute(Should handle Python completion results correctly):
\ ]
\ }
\ })
Execute(Should handle missing detail keys):
AssertEqual
\ [
\ {'word': 'x', 'menu': '', 'info': 'y', 'kind': 'f', 'icase': 1},
\ ],
\ ale#completion#ParseLSPCompletions({
\ 'jsonrpc': '2.0',
\ 'id': 6,
\ 'result': {
\ 'isIncomplete': v:false,
\ 'items': [
\ {
\ 'label': 'x',
\ 'kind': 3,
\ 'documentation': 'y',
\ },
\ ]
\ }
\ })