2019-03-21 04:55:05 +00:00
|
|
|
Before:
|
2023-09-13 23:38:12 +00:00
|
|
|
call ale#assert#SetUpLinterTest('elm', 'ls')
|
2019-03-21 04:55:05 +00:00
|
|
|
|
|
|
|
After:
|
|
|
|
call ale#assert#TearDownLinterTest()
|
|
|
|
|
|
|
|
Execute(The default executable path should be correct):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/elm/newapp/src/Main.elm')
|
2019-03-21 04:55:05 +00:00
|
|
|
|
2019-06-21 18:07:23 +00:00
|
|
|
AssertLinter 'elm-language-server', ale#Escape('elm-language-server') . ' --stdio'
|
2019-03-21 04:55:05 +00:00
|
|
|
|
|
|
|
Execute(The project root should be detected correctly):
|
|
|
|
AssertLSPProject ''
|
|
|
|
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/elm/newapp/src/Main.elm')
|
2019-03-21 04:55:05 +00:00
|
|
|
|
2021-03-20 22:11:22 +00:00
|
|
|
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/elm/newapp')
|
2019-03-21 04:55:05 +00:00
|
|
|
|
|
|
|
Execute(Should let users configure a global executable and override local paths):
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/elm/newapp/src/Main.elm')
|
2019-03-21 04:55:05 +00:00
|
|
|
|
2019-06-21 18:07:23 +00:00
|
|
|
let g:ale_elm_ls_executable = '/path/to/custom/elm-language-server'
|
|
|
|
let g:ale_elm_ls_use_global = 1
|
2019-03-21 04:55:05 +00:00
|
|
|
|
2019-06-21 18:07:23 +00:00
|
|
|
AssertLinter '/path/to/custom/elm-language-server',
|
|
|
|
\ ale#Escape('/path/to/custom/elm-language-server') . ' --stdio'
|
2019-03-21 04:55:05 +00:00
|
|
|
|
|
|
|
Execute(The language should be correct):
|
|
|
|
AssertLSPLanguage 'elm'
|