2017-12-19 18:10:29 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('rust', 'rustc')
|
2017-12-19 18:10:29 +00:00
|
|
|
|
|
|
|
After:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-12-19 18:10:29 +00:00
|
|
|
|
|
|
|
Execute(The default command should be correct):
|
2018-08-10 20:50:52 +00:00
|
|
|
AssertLinter 'rustc', 'rustc --error-format=json -Z no-codegen -'
|
2017-12-19 18:10:29 +00:00
|
|
|
|
|
|
|
Execute(The options should be configurable):
|
|
|
|
let b:ale_rust_rustc_options = '--foo'
|
|
|
|
|
2018-07-15 17:24:53 +00:00
|
|
|
AssertLinter 'rustc', 'rustc --error-format=json --foo -'
|
2017-12-19 18:10:29 +00:00
|
|
|
|
|
|
|
Execute(Some default paths should be included when the project is a Cargo project):
|
|
|
|
call ale#test#SetFilename('cargo_paths/test.rs')
|
|
|
|
|
2018-08-10 20:50:52 +00:00
|
|
|
AssertLinter 'rustc', 'rustc --error-format=json -Z no-codegen'
|
2017-12-19 18:10:29 +00:00
|
|
|
\ . ' -L ' . ale#Escape(ale#path#GetAbsPath(g:dir, 'cargo_paths/target/debug/deps'))
|
|
|
|
\ . ' -L ' . ale#Escape(ale#path#GetAbsPath(g:dir, 'cargo_paths/target/release/deps'))
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . ' -'
|