]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Upgrade CI to clangd-15
authorYegappan Lakshmanan <yegappan@yahoo.com>
Tue, 4 Apr 2023 02:56:59 +0000 (19:56 -0700)
committerYegappan Lakshmanan <yegappan@yahoo.com>
Tue, 4 Apr 2023 02:56:59 +0000 (19:56 -0700)
.github/workflows/unitests.yml
test/clangd_tests.vim
test/run_tests.cmd

index 6dc7144739bcfdde94965231d6c5318be025b9e2..a7295210ff18b168a41b024cdb92a92e48f2dd77 100644 (file)
@@ -9,7 +9,7 @@ jobs:
         run: |
           sudo apt update
           # install clangd language server
-          sudo apt install -y clangd-14
+          sudo apt install -y clangd-15
           # install nodejs
           sudo apt install -y curl
           curl -fsSL https://deb.nodesource.com/setup_18.x | sudo bash -
index 2bee0980356b61d55b72f53690b03d44c57b7132..03ec56736759b3c573d87af41ee7b3139c253b0c 100644 (file)
@@ -8,7 +8,7 @@ g:LspOptionsSet(lspOpts)
 
 var lspServers = [{
       filetype: ['c', 'cpp'],
-      path: (exepath('clangd-14') ?? exepath('clangd')),
+      path: (exepath('clangd-15') ?? exepath('clangd')),
       args: ['--background-index', '--clang-tidy'],
       initializationOptions: { clangdFileStatus: true },
       customNotificationHandlers: {
@@ -18,7 +18,7 @@ var lspServers = [{
       }
   }]
 call LspAddServer(lspServers)
-echomsg systemlist($'{lspServers[0].path} --version')
+echomsg systemlist($'{shellescape(lspServers[0].path)} --version')
 
 # Test for formatting a file using LspFormat
 def g:Test_LspFormat()
@@ -351,20 +351,21 @@ def g:Test_LspDiag_Multi()
 
   var bnr: number = bufnr()
 
-  setline(1, [
-    'int i = "a";',
-    'int j = i;',
-    'int y = 0;'
-  ])
+  var lines =<< trim END
+    int i = "a";
+    int j = i;
+    int y = 0;
+  END
+  setline(1, lines)
   :redraw!
   # TODO: Waiting count doesn't include Warning, Info, and Hint diags
-  g:WaitForServerFileLoad(2)
+  g:WaitForServerFileLoad(3)
   :LspDiagShow
   var qfl: list<dict<any>> = getloclist(0)
   assert_equal('quickfix', getwinvar(winnr('$'), '&buftype'))
   assert_equal(bnr, qfl[0].bufnr)
   assert_equal(3, qfl->len())
-  assert_equal([1, 5, 'W'], [qfl[0].lnum, qfl[0].col, qfl[0].type])
+  assert_equal([1, 5, 'E'], [qfl[0].lnum, qfl[0].col, qfl[0].type])
   assert_equal([1, 9, 'E'], [qfl[1].lnum, qfl[1].col, qfl[1].type])
   assert_equal([2, 9, 'E'], [qfl[2].lnum, qfl[2].col, qfl[2].type])
   close
@@ -952,7 +953,7 @@ def g:Test_LspHover()
     }
   END
   setline(1, lines)
-  g:WaitForServerFileLoad(0)
+  g:WaitForServerFileLoad(1)
   cursor(8, 4)
   var output = execute(':LspHover')->split("\n")
   assert_equal([], output)
index 925ab7a8e7750f0f6f1be0f4fbb0acecc62db848..863d06dfc16db17d88822230be31ecc1842a3029 100644 (file)
@@ -6,7 +6,7 @@ SETLOCAL
 SET VIMPRG="vim.exe"
 SET VIM_CMD=%VIMPRG% -u NONE -U NONE -i NONE --noplugin -N --not-a-term
 
-%VIM_CMD% -c "let g:TestName=clangd_tests.vim" -S runner.vim
+%VIM_CMD% -c "let g:TestName='clangd_tests.vim'" -S runner.vim
 
 echo LSP unit test results
 type results.txt