summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/command_callback/r_paths/.Rprofile0
-rw-r--r--test/command_callback/test_r_languageserver_callbacks.vader22
2 files changed, 22 insertions, 0 deletions
diff --git a/test/command_callback/r_paths/.Rprofile b/test/command_callback/r_paths/.Rprofile
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/command_callback/r_paths/.Rprofile
diff --git a/test/command_callback/test_r_languageserver_callbacks.vader b/test/command_callback/test_r_languageserver_callbacks.vader
new file mode 100644
index 00000000..7829165c
--- /dev/null
+++ b/test/command_callback/test_r_languageserver_callbacks.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('r_paths/dummy/test.R')
+
+ AssertLSPProject ale#path#Simplify(g:dir . '/r_paths')
+
+Execute(Should accept configuration settings):
+ AssertLSPConfig {}
+
+ let b:ale_r_languageserver_options = {'r': {'lsp': {'debug': 'true', 'diagnostics': 'true'}}}
+
+ AssertLSPConfig {'r': {'lsp': {'debug': 'true', 'diagnostics': 'true'}}}