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