test/clangd_tests.vim | 25 +++++++++++++++++-------- diff --git a/test/clangd_tests.vim b/test/clangd_tests.vim index 03ec56736759b3c573d87af41ee7b3139c253b0c..7e9909ca85c5b225727bf0fffec6f20845dc9bfe 100644 --- a/test/clangd_tests.vim +++ b/test/clangd_tests.vim @@ -838,26 +838,35 @@ tabclose exe "normal! \" assert_equal([21, 6], [line('.'), col('.')]) - # FIXME: :LspGotoTypeDef and :LspGotoImpl are supported only with clang-14. - # This clangd version is not available in Github CI. + # :LspGotoTypeDef + cursor(21, 2) + :LspGotoTypeDef + assert_equal([1, 7], [line('.'), col('.')]) + exe "normal! \" + assert_equal([21, 2], [line('.'), col('.')]) + + # :LspGotoImpl + cursor(21, 6) + :LspGotoImpl + assert_equal([12, 11], [line('.'), col('.')]) + exe "normal! \" + assert_equal([21, 6], [line('.'), col('.')]) # Error cases - # FIXME: The following tests are failing in Github CI. Comment out for now. - if 0 :messages clear cursor(11, 5) :LspGotoDeclaration var m = execute('messages')->split("\n") - assert_equal('Error: declaration is not found', m[1]) + assert_equal('Error: symbol declaration is not found', m[1]) :messages clear :LspGotoDefinition m = execute('messages')->split("\n") - assert_equal('Error: definition is not found', m[1]) + assert_equal('Error: symbol definition is not found', m[1]) :messages clear :LspGotoImpl m = execute('messages')->split("\n") - assert_equal('Error: implementation is not found', m[1]) - endif + assert_equal('Error: symbol implementation is not found', m[1]) + :messages clear # Test for LspPeekDeclaration cursor(21, 6)