mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
27 lines
760 B
Plaintext
27 lines
760 B
Plaintext
Before:
|
|
Save g:ale_toml_tombi_executable
|
|
Save g:ale_toml_tombi_lint_options
|
|
|
|
" Use an invalid global executable, so we don't match it.
|
|
let g:ale_toml_tombi_executable = 'xxxinvalid'
|
|
let g:ale_toml_tombi_lint_options = ''
|
|
|
|
call ale#test#SetDirectory('/testplugin/test/fixers')
|
|
|
|
After:
|
|
Restore
|
|
|
|
call ale#test#RestoreDirectory()
|
|
|
|
Execute(The tombi lint callback should return the correct default values):
|
|
AssertEqual
|
|
\ {'command': ale#Escape('xxxinvalid') . ' lint'},
|
|
\ ale#fixers#tombi_lint#Fix(bufnr(''))
|
|
|
|
Execute(The tombi lint callback should include custom options):
|
|
let g:ale_toml_tombi_lint_options = "--offline"
|
|
|
|
AssertEqual
|
|
\ {'command': ale#Escape('xxxinvalid') . ' lint --offline'},
|
|
\ ale#fixers#tombi_lint#Fix(bufnr(''))
|