From a92627e1e1bbd3dfc21ab1a16547c94e792da2a7 Mon Sep 17 00:00:00 2001 From: w0rp Date: Fri, 29 Mar 2019 13:42:24 +0000 Subject: Fix #2402 - Handle null LSP references responses --- test/test_find_references.vader | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'test/test_find_references.vader') diff --git a/test/test_find_references.vader b/test/test_find_references.vader index eb06e3bc..1a147849 100644 --- a/test/test_find_references.vader +++ b/test/test_find_references.vader @@ -253,14 +253,15 @@ Execute(LSP reference responses should be handled): Execute(Preview windows should not be opened for empty LSP reference responses): call ale#references#SetMap({3: {}}) - call ale#references#HandleLSPResponse( - \ 1, - \ { - \ 'id': 3, - \ 'result': [ - \ ], - \ } - \) + call ale#references#HandleLSPResponse(1, {'id': 3, 'result': []}) + + Assert !g:preview_called + AssertEqual {}, ale#references#GetMap() + AssertEqual ['echom ''No references found.'''], g:expr_list + +Execute(LSP reference responses with a null result should be handled): + call ale#references#SetMap({3: {}}) + call ale#references#HandleLSPResponse(1, {'id': 3, 'result': v:null}) Assert !g:preview_called AssertEqual {}, ale#references#GetMap() -- cgit v1.2.3