diff options
author | w0rp <devw0rp@gmail.com> | 2020-08-18 01:48:07 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2020-08-18 01:48:07 +0100 |
commit | 4df352eee585cf50edb208aea713fe1a67ac4094 (patch) | |
tree | 32906a5c520fc9389110e2fdb93fe67c4ae7e90c /test/lsp | |
parent | bc6304bdb0361b3236222cf857427a924c9e2c4d (diff) | |
download | ale-4df352eee585cf50edb208aea713fe1a67ac4094.zip |
Fix #3294 - Fix hover off by 1, handle LSP server crashes
Diffstat (limited to 'test/lsp')
-rw-r--r-- | test/lsp/test_lsp_startup.vader | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lsp/test_lsp_startup.vader b/test/lsp/test_lsp_startup.vader index c29690bf..cd9b59dd 100644 --- a/test/lsp/test_lsp_startup.vader +++ b/test/lsp/test_lsp_startup.vader @@ -422,3 +422,13 @@ Execute(Deferred addresses should be handled correctly): Assert Start() call ale#test#FlushJobs() call AssertInitSuccess('foo', 'localhost:1234', 'foobar', '/foo/bar', '') + +Execute(Servers that have crashed should be restarted): + call ale#lsp#Register('foo', '/foo/bar', {}) + call extend(ale#lsp#GetConnections()['foo:/foo/bar'], {'initialized': 1}) + + " Starting the program again should reset initialized to `0`. + call ale#lsp#StartProgram('foo:/foo/bar', 'foobar', 'foobar --start') + + AssertEqual 0, ale#lsp#GetConnections()['foo:/foo/bar']['initialized'] + AssertEqual ['initialize'], map(PopMessages(), 'v:val[''method'']') |