From 302aea2f0aaf7ac520f79b88c5b0d01b8abb1929 Mon Sep 17 00:00:00 2001 From: Andreas Louv Date: Tue, 11 Apr 2023 17:59:16 +0200 Subject: [PATCH] Add test to ensure that helptags can be generated without problems 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 1_LspRunTests[20]..Test_Helptags, line 1 --- test/not_lspserver_related_tests.vim | 14 ++++++++++++++ test/run_tests.sh | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 test/not_lspserver_related_tests.vim diff --git a/test/not_lspserver_related_tests.vim b/test/not_lspserver_related_tests.vim new file mode 100644 index 0000000..57c7525 --- /dev/null +++ b/test/not_lspserver_related_tests.vim @@ -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 diff --git a/test/run_tests.sh b/test/run_tests.sh index a68e0b9..151dcbd 100755 --- a/test/run_tests.sh +++ b/test/run_tests.sh @@ -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 -- 2.48.1