]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Add test to ensure that helptags can be generated without problems
authorAndreas Louv <andreas@louv.dk>
Tue, 11 Apr 2023 15:59:16 +0000 (17:59 +0200)
committerAndreas Louv <andreas@louv.dk>
Tue, 11 Apr 2023 15:59:19 +0000 (17:59 +0200)
The test will raise an exception like:

Error: Test Test_Helptags() failed with exception Vim(helptags):E154: Duplicate tag "lsp-opt-completionKinds" in file ../doc/lsp.txt at command line..script ~/.vim/pack/plugins/opt/lsp/test/runner.vim[50]..function <SNR>1_LspRunTests[20]..Test_Helptags, line 1

test/not_lspserver_related_tests.vim [new file with mode: 0644]
test/run_tests.sh

diff --git a/test/not_lspserver_related_tests.vim b/test/not_lspserver_related_tests.vim
new file mode 100644 (file)
index 0000000..57c7525
--- /dev/null
@@ -0,0 +1,14 @@
+vim9script
+# Unit tests for Vim Language Server Protocol (LSP) for various functionality 
+
+# Test for no duplicates in helptags
+def g:Test_Helptags()
+  :helptags ../doc
+enddef
+
+# Only here to because the test runner needs it
+def g:StartLangServer(): bool
+  return true
+enddef
+
+# vim: shiftwidth=2 softtabstop=2 noexpandtab
index a68e0b9c826f259b0442d2fe70186c58ed9bb640..151dcbd6d6e0aa3f90e6040565f30de238927f64 100755 (executable)
@@ -10,7 +10,7 @@ fi
 
 VIM_CMD="$VIMPRG -u NONE -U NONE -i NONE --noplugin -N --not-a-term"
 
-TESTS="clangd_tests.vim tsserver_tests.vim gopls_tests.vim"
+TESTS="clangd_tests.vim tsserver_tests.vim gopls_tests.vim not_lspserver_related_tests.vim"
 
 for testfile in $TESTS
 do