aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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