Documentation
¶
Overview ¶
Package lsptest is a fake language server for tests: the test binary re-executes itself, so tests need no real language server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertGone ¶
AssertGone fails unless every pid has exited.
func Run ¶
func Run()
Run acts as the fake server and exits when the test binary was started by an entry from Server. Call it first in TestMain.
func Server ¶
Server returns a config entry running the fake server. Each opt is key=value or a bare flag:
log=FILE append "start" and each received method (didOpen
and didChange add the text, quoted) to FILE
pidfile=FILE append the server's pid to FILE
child also start a child process (its pid goes to pidfile)
envfile=FILE write the server's environment to FILE
nopublish never publish diagnostics
crash exit right after the first response
ignore-shutdown never answer shutdown and ignore exit
hang-init never answer initialize
refs=FILE answer references with FILE's locations
def=FILE answer definition with FILE's locations
By default every didOpen and didChange publishes one diagnostic per line containing "ERR:" (an error) or "WARN:" (a warning): the message is the rest of the line and the column is where the marker starts.
Types ¶
Click to show internal directories.
Click to hide internal directories.