From: Yegappan Lakshmanan Date: Sun, 2 Apr 2023 22:22:57 +0000 (-0700) Subject: Handle missing test functions properly X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=8f48f6581cfbf6354a2a87dbc2d1959338ae771c;p=vim-lsp.git Handle missing test functions properly --- diff --git a/test/runner.vim b/test/runner.vim index 484a865..e52f3ad 100644 --- a/test/runner.vim +++ b/test/runner.vim @@ -17,6 +17,11 @@ def LspRunTests() ->split("\n") ->map("v:val->substitute('^def ', '', '')") ->sort() + if fns->empty() + # No tests are found + writefile(['No tests are found'], 'results.txt') + return + endif for f in fns v:errors = [] v:errmsg = '' diff --git a/test/tsserver_tests.vim b/test/tsserver_tests.vim index d9348a1..99e2836 100644 --- a/test/tsserver_tests.vim +++ b/test/tsserver_tests.vim @@ -13,11 +13,6 @@ var lspServers = [{ call LspAddServer(lspServers) echomsg systemlist($'{lspServers[0].path} --version') -def g:Test_Empty() - # At least one test is needed for each file, delete this - # whenever a real test is created. -enddef - # Test for auto-completion. Make sure that only keywords that matches with the # keyword before the cursor are shown. # def g:Test_LspCompletion1()