From: Andreas Louv Date: Mon, 3 Apr 2023 12:30:30 +0000 (+0200) Subject: Add test for clearing existing popups with ":LspHover" X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=3d6cd38c9f2ad361f563e8760bd06b65b5fbe893;p=vim-lsp.git Add test for clearing existing popups with ":LspHover" --- diff --git a/test/clangd_tests.vim b/test/clangd_tests.vim index 5ceabb4..f86fb8f 100644 --- a/test/clangd_tests.vim +++ b/test/clangd_tests.vim @@ -947,6 +947,8 @@ def g:Test_LspHover() void f2(void) { f1(5); + char *z = "z"; + f1(z); } END setline(1, lines) @@ -960,7 +962,19 @@ def g:Test_LspHover() cursor(7, 1) :LspHover assert_equal([], popup_list()) + + # Show current diagnostic as to open another popup. + # Then we can test that LspHover closes all existing popups + cursor(10, 6) + :LspDiagCurrent + assert_equal(1, popup_list()->len()) + :LspHover + assert_equal(1, popup_list()->len()) + popup_clear() + :%bw! + + enddef # Test for :LspShowSignature