2017-12-19 13:10:29 -05:00
|
|
|
Before:
|
2018-07-15 13:24:53 -04:00
|
|
|
call ale#assert#SetUpLinterTest('rust', 'rustc')
|
2017-12-19 13:10:29 -05:00
|
|
|
|
|
|
|
After:
|
2018-07-15 13:24:53 -04:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-12-19 13:10:29 -05:00
|
|
|
|
|
|
|
Execute(The default command should be correct):
|
2018-08-10 16:50:52 -04:00
|
|
|
AssertLinter 'rustc', 'rustc --error-format=json -Z no-codegen -'
|
2017-12-19 13:10:29 -05:00
|
|
|
|
|
|
|
Execute(The options should be configurable):
|
|
|
|
let b:ale_rust_rustc_options = '--foo'
|
|
|
|
|
2018-07-15 13:24:53 -04:00
|
|
|
AssertLinter 'rustc', 'rustc --error-format=json --foo -'
|
2017-12-19 13:10:29 -05: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 16:50:52 -04:00
|
|
|
AssertLinter 'rustc', 'rustc --error-format=json -Z no-codegen'
|
2017-12-19 13:10:29 -05: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 13:24:53 -04:00
|
|
|
\ . ' -'
|