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
|
|
|
|
2022-10-29 11:56:09 +00:00
|
|
|
Execute(The toolchain should be omitted if not given):
|
2018-04-12 18:42:38 +00:00
|
|
|
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
|
|
|
|
2022-04-01 12:17:15 +00:00
|
|
|
Execute(The project root should be detected correctly for cargo projects):
|
2022-03-23 01:56:29 +00:00
|
|
|
call ale#test#SetFilename('../test-files/rust/cargo/testfile.rs')
|
2017-08-02 22:21:30 +00:00
|
|
|
|
2022-03-23 01:56:29 +00:00
|
|
|
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/rust/cargo')
|
2019-03-05 09:09:29 +00:00
|
|
|
|
2022-04-01 12:17:15 +00:00
|
|
|
Execute(The project root should be empty when no project files can be detected):
|
|
|
|
call ale#test#SetFilename('../test-files/dummy')
|
|
|
|
|
|
|
|
AssertLSPProject ''
|
|
|
|
|
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'}}
|