diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-01-30 01:52:42 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-01-30 01:52:42 +0900 |
commit | a12bd9573bbb80d545937ffd386e94daef246204 (patch) | |
tree | eb89c0bdf35b8c067add04233fe23e2183cfdb22 /test | |
parent | 91882919de32d7f121f88ba1350293bf31ff484d (diff) | |
download | vim-lsp-settings-a12bd9573bbb80d545937ffd386e94daef246204.tar.gz vim-lsp-settings-a12bd9573bbb80d545937ffd386e94daef246204.tar.bz2 vim-lsp-settings-a12bd9573bbb80d545937ffd386e94daef246204.zip |
Add test
Diffstat (limited to 'test')
-rw-r--r-- | test/lsp_settings.vimspec | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/lsp_settings.vimspec b/test/lsp_settings.vimspec index a6055c9..cff06a7 100644 --- a/test/lsp_settings.vimspec +++ b/test/lsp_settings.vimspec @@ -22,7 +22,19 @@ Describe lsp_settings Assert Equals(lsp_settings#executable('unknown-command'), 0) End - It should return command is executable in server/foo-bar/foo-bar + It should return 0 when command is not in server/foo-bar/foo-bar + let l:servers_dir = lsp_settings#servers_dir() + + try + call delete(l:servers_dir . '/foo-bar', 'rf') + call mkdir(l:servers_dir . '/foo-bar', 'p') + Assert Equals(lsp_settings#executable('foo-bar'), 0) + finally + call delete(l:servers_dir . '/foo-bar', 'rf') + endtry + End + + It should return 1 when command is executable in server/foo-bar/foo-bar let l:servers_dir = lsp_settings#servers_dir() try |