summaryrefslogtreecommitdiff
path: root/test/linter/test_r_languageserver.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/linter/test_r_languageserver.vader')
-rw-r--r--test/linter/test_r_languageserver.vader22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/linter/test_r_languageserver.vader b/test/linter/test_r_languageserver.vader
new file mode 100644
index 00000000..b5be0396
--- /dev/null
+++ b/test/linter/test_r_languageserver.vader
@@ -0,0 +1,22 @@
+Before:
+ call ale#assert#SetUpLinterTest('r', 'languageserver')
+
+After:
+ call ale#assert#TearDownLinterTest()
+
+Execute(The default executable path should be correct):
+ AssertLinter 'Rscript', 'Rscript --vanilla -e ' . ale#Escape('languageserver::run()')
+
+Execute(The project root should be detected correctly):
+ AssertLSPProject '.'
+
+ call ale#test#SetFilename('../test-files/r/dummy/test.R')
+
+ AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/r')
+
+Execute(Should accept configuration settings):
+ AssertLSPConfig {}
+
+ let b:ale_r_languageserver_config = {'r': {'lsp': {'debug': 'true', 'diagnostics': 'true'}}}
+
+ AssertLSPConfig {'r': {'lsp': {'debug': 'true', 'diagnostics': 'true'}}}