test/clangd_tests.vim | 20 ++++++++------------ diff --git a/test/clangd_tests.vim b/test/clangd_tests.vim index 89e6d6647f20890655fb6038afeae5c3e2a1eea5..62a832e4e590eec2ae3e75ead77121de226bd091 100644 --- a/test/clangd_tests.vim +++ b/test/clangd_tests.vim @@ -155,7 +155,7 @@ # Test for :LspShowReferences - showing all the references to a symbol in a # file using LSP def g:Test_LspShowReferences() - :silent! edit Xtest.c + :silent! edit XshowRefs.c sleep 200m var lines: list =<< trim END int count; @@ -234,7 +234,7 @@ var ids = popup_list() assert_equal(2, ids->len()) var filePopupAttrs = ids[0]->popup_getoptions() var refPopupAttrs = ids[1]->popup_getoptions() - assert_match('Xtest', filePopupAttrs.title) + assert_match('XshowRefs', filePopupAttrs.title) assert_equal('Symbol References', refPopupAttrs.title) assert_equal(10, line('.', ids[0])) assert_equal(3, line('$', ids[1])) @@ -1053,7 +1053,7 @@ assert_equal(['### function `f1` ', '', '---', '→ `int` ', 'Parameters: ', '- `int a`', '', '---', '```cpp', 'int f1(int a)', '```'], getbufline(winbufnr(p[0]), 1, '$')) popup_close(p[0]) cursor(7, 1) output = execute(':LspHover')->split("\n") - assert_equal('Warn: No hover messages found for current position', output[0]) + assert_equal('Warn: No documentation found for current keyword', output[0]) output = execute(':silent LspHover')->split("\n") assert_equal([], output) assert_equal([], popup_list()) @@ -1320,7 +1320,7 @@ def g:Test_LspCustomNotificationHandlers() g:LSPTest_customNotificationHandlerReplied = false - silent! edit Xtest.c + silent! edit XcustomNotification.c sleep 200m var lines: list =<< trim END int a = 1; @@ -1351,25 +1351,21 @@ :redraw! # LspGotoDefinition et al cursor(5, 10) - assert_equal([], - execute('LspGotoDefinition')->split("\n")) + assert_equal([], execute('LspGotoDefinition')->split("\n")) assert_equal([2, 14], [line('.'), col('.')]) cursor(6, 10) - assert_equal([], - execute('LspGotoDefinition')->split("\n")) + assert_equal([], execute('LspGotoDefinition')->split("\n")) assert_equal([1, 5], [line('.'), col('.')]) # LspShowReferences cursor(6, 10) - assert_equal([], - execute('LspShowReferences')->split("\n")) + assert_equal([], execute('LspShowReferences')->split("\n")) :lclose # LspRename cursor(6, 10) - assert_equal([], - execute('LspRename counterFI')->split("\n")) + assert_equal([], execute('LspRename counterFI')->split("\n")) sleep 100m assert_equal('int counterFI;', getline(1)) assert_equal(' return counterFI + 1;', getline(6))