From 3d6cd38c9f2ad361f563e8760bd06b65b5fbe893 Mon Sep 17 00:00:00 2001 From: Andreas Louv Date: Mon, 3 Apr 2023 14:30:30 +0200 Subject: [PATCH] Add test for clearing existing popups with ":LspHover" --- test/clangd_tests.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- 2.48.1