1
0
Fork 0
mirror of synced 2024-06-30 12:31:09 -04:00
ultimate-vim/sources_non_forked/ale/test/lsp/test_update_config.vader
2022-05-19 21:16:38 +08:00

22 lines
635 B
Plaintext

Before:
runtime autoload/ale/lsp.vim
let g:conn_id = ale#lsp#Register('executable', '/foo/bar', {})
" Stub out this function, so we test updating configs.
function! ale#lsp#Send(conn_id, message) abort
endfunction
After:
Restore
unlet! g:conn_id
runtime autoload/ale/lsp.vim
Execute(Only send updates when the configuration dictionary changes):
AssertEqual 0, ale#lsp#UpdateConfig(g:conn_id, bufnr(''), {})
AssertEqual 1, ale#lsp#UpdateConfig(g:conn_id, bufnr(''), {'a': 1})
AssertEqual 0, ale#lsp#UpdateConfig(g:conn_id, bufnr(''), {'a': 1})
AssertEqual 1, ale#lsp#UpdateConfig(g:conn_id, bufnr(''), {})