summaryrefslogtreecommitdiff
path: root/test/command_callback/test_elm_ls_command_callbacks.vader
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2019-07-29 21:56:27 +0100
committerGitHub <noreply@github.com>2019-07-29 21:56:27 +0100
commitb1230873b6c2044864b3ea2302b8521670fa4137 (patch)
tree2b5ff7b3b2019cb6258333dd7fa5811ad3063255 /test/command_callback/test_elm_ls_command_callbacks.vader
parent4fe7402e89b1af299c72936df15c5b9385ddbbed (diff)
parentfa5aecc250370b4be56b65601ebecbd1e9521046 (diff)
downloadale-b1230873b6c2044864b3ea2302b8521670fa4137.zip
Merge pull request #2612 from andys8/feature/elm-language-server-update
Update elm-ls
Diffstat (limited to 'test/command_callback/test_elm_ls_command_callbacks.vader')
-rw-r--r--test/command_callback/test_elm_ls_command_callbacks.vader29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/command_callback/test_elm_ls_command_callbacks.vader b/test/command_callback/test_elm_ls_command_callbacks.vader
new file mode 100644
index 00000000..3e1d5fbf
--- /dev/null
+++ b/test/command_callback/test_elm_ls_command_callbacks.vader
@@ -0,0 +1,29 @@
+Before:
+ call ale#assert#SetUpLinterTest('elm', 'elm_ls')
+
+After:
+ call ale#assert#TearDownLinterTest()
+
+Execute(The default executable path should be correct):
+ call ale#test#SetFilename('../elm-test-files/newapp/src/Main.elm')
+
+ AssertLinter 'elm-language-server', ale#Escape('elm-language-server') . ' --stdio'
+
+Execute(The project root should be detected correctly):
+ AssertLSPProject ''
+
+ call ale#test#SetFilename('../elm-test-files/newapp/src/Main.elm')
+
+ AssertLSPProject ale#path#Simplify(g:dir . '/../elm-test-files/newapp')
+
+Execute(Should let users configure a global executable and override local paths):
+ call ale#test#SetFilename('../elm-test-files/newapp/src/Main.elm')
+
+ let g:ale_elm_ls_executable = '/path/to/custom/elm-language-server'
+ let g:ale_elm_ls_use_global = 1
+
+ AssertLinter '/path/to/custom/elm-language-server',
+ \ ale#Escape('/path/to/custom/elm-language-server') . ' --stdio'
+
+Execute(The language should be correct):
+ AssertLSPLanguage 'elm'