2017-08-02 22:21:30 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('rust', 'rls')
|
2017-08-02 22:21:30 +00:00
|
|
|
|
|
|
|
After:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-08-02 22:21:30 +00:00
|
|
|
|
|
|
|
Execute(The default executable path should be correct):
|
2019-04-11 15:38:16 +00:00
|
|
|
AssertLinter 'rls', ale#Escape('rls')
|
2017-11-26 18:47:30 +00:00
|
|
|
|
|
|
|
Execute(The toolchain should be configurable):
|
|
|
|
let g:ale_rust_rls_toolchain = 'stable'
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'rls', ale#Escape('rls') . ' +' . ale#Escape('stable')
|
2017-08-02 22:21:30 +00:00
|
|
|
|
2018-04-12 18:42:38 +00:00
|
|
|
Execute(The toolchain should be ommitted if not given):
|
|
|
|
let g:ale_rust_rls_toolchain = ''
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'rls', ale#Escape('rls')
|
2018-04-12 18:42:38 +00:00
|
|
|
|
2017-08-02 22:21:30 +00:00
|
|
|
Execute(The project root should be detected correctly):
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLSPProject ''
|
2017-08-02 22:21:30 +00:00
|
|
|
|
2021-03-20 22:11:22 +00:00
|
|
|
call ale#test#SetFilename('../test-files/rust/test.rs')
|
2017-08-02 22:21:30 +00:00
|
|
|
|
2021-03-20 22:11:22 +00:00
|
|
|
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/rust')
|
2019-03-05 09:09:29 +00:00
|
|
|
|
|
|
|
Execute(Should accept configuration settings):
|
|
|
|
AssertLSPConfig {}
|
|
|
|
let b:ale_rust_rls_config = {'rust': {'clippy_preference': 'on'}}
|
|
|
|
AssertLSPConfig {'rust': {'clippy_preference': 'on'}}
|