summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEric Zhao <21zhaoe@protonmail.com>2020-11-21 15:56:38 -0500
committerGitHub <noreply@github.com>2020-11-21 20:56:38 +0000
commit9692c0c64c83bb8f67962cf35e7dc3f1757aa8cc (patch)
treed672572b9eb885b5807f441cb792c9a57c1dc15a /test
parent5458a1b29167b1fefde5fb6545e371a9d77ca36e (diff)
downloadale-9692c0c64c83bb8f67962cf35e7dc3f1757aa8cc.zip
Add support for R languageserver (#3370)
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'}}}