GNU TeXmacsUser manualReferenceAboutEnglish
Tests and pitfalls of the language servers

1.The test suite

The suite lsp is

lsp-test.scm

(lsp-test-failures), run with the other suites of

check-master.scm

(see the tests). Most of it needs no language server:

When clangd is installed, the suite also runs it on that project (hover, diagnostics, the client of a buffer) and tests the editor on a C++ file: the buffer followed, the diagnostics underlined (the alternative selection code-errors), F8, the definition, the completion (synchronous and asynchronous), the log page and its refresh, the hover balloon, the didChange, didSave and didClose sent when the buffer is saved and closed, and the servers stopped by lsp-stop-servers. On a third file, it tests the actions: the page of the diagnostics, the focus bar, a quick fix, the signature, the references and the outline, the highlights, folding and unfolding a block, the symbols of the project and the calls, the colours and hints, a rename and the formatting. On a document of the project, it tests the code blocks (the group code blocks, turned on by lsp-blocks-force!, not by the preference): their virtual files, the target at the cursor, their diagnostics at their places, the definition in a block, a paragraph inserted above them, a block removed and one whose language changes, and a place in a block of a closed document; then the blocks of a language as one file (the group code blocks together): the lines of the unit and their places, a name of a block known in the next one (its only error), the definition in the other block, the colours of the server on the lines of the blocks, and a rename which changes both blocks.

The suite runs after kbd-menu in check-master: editing a C++ buffer loads the keyboard maps of programs, and the checks of kbd-menu which type mathematics must come before that (see the comment of test-typing-math-mode in

kbd-menu-test.scm

: once those maps are loaded, without a window, the first key after $ in text still sees the text mode).

2.Pitfalls

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".