aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2020-01-30 00:52:30 +0900
committerYasuhiro Matsumoto <mattn.jp@gmail.com>2020-01-30 00:52:30 +0900
commit3fa9d50e0e3cf5c4b34eef7ce9ea20a52d82e572 (patch)
tree2224dbef8c2198a0d4a5d7eab9191c5f53a44e95
parent61dccb88b0d0fd1df2ee3778a7c96210689e8c59 (diff)
downloadvim-lsp-settings-3fa9d50e0e3cf5c4b34eef7ce9ea20a52d82e572.tar.gz
vim-lsp-settings-3fa9d50e0e3cf5c4b34eef7ce9ea20a52d82e572.tar.bz2
vim-lsp-settings-3fa9d50e0e3cf5c4b34eef7ce9ea20a52d82e572.zip
Add test
-rw-r--r--test/lsp_settings.vimspec14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/lsp_settings.vimspec b/test/lsp_settings.vimspec
new file mode 100644
index 0000000..743f951
--- /dev/null
+++ b/test/lsp_settings.vimspec
@@ -0,0 +1,14 @@
+Describe lsp_settings
+ Describe lsp_settings#get
+ It should return configuration value from key and name
+ Assert Equals(lsp_settings#get('pyls', 'cmd', 'bad'), 'bad')
+ let g:lsp_settings = {'pyls': {'cmd': 'good'}}
+ Assert Equals(lsp_settings#get('pyls', 'cmd', 'bad'), 'good')
+ unlet g:lsp_settings
+ End
+
+ It should return default value with lambda
+ Assert Equals(lsp_settings#get('pyls', 'cmd', {key, name-> 'good'}), 'good')
+ End
+ End
+End