mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Reduce lines of code for tombi
This commit is contained in:
@@ -14,20 +14,13 @@ After:
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The tombi format callback should return the correct default values):
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'command': ale#Escape('xxxinvalid') . ' format',
|
||||
\ },
|
||||
\ {'command': ale#Escape('xxxinvalid') . ' format'},
|
||||
\ ale#fixers#tombi_format#Fix(bufnr(''))
|
||||
|
||||
Execute(The tombi format callback should include custom options):
|
||||
let g:ale_toml_tombi_format_options = "--offline"
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'command': ale#Escape('xxxinvalid')
|
||||
\ . ' format'
|
||||
\ . ' ' . g:ale_toml_tombi_format_options
|
||||
\ },
|
||||
\ {'command': ale#Escape('xxxinvalid') . ' format --offline'},
|
||||
\ ale#fixers#tombi_format#Fix(bufnr(''))
|
||||
|
||||
@@ -14,20 +14,13 @@ After:
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The tombi lint callback should return the correct default values):
|
||||
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'command': ale#Escape('xxxinvalid') . ' lint',
|
||||
\ },
|
||||
\ {'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'
|
||||
\ . ' ' . g:ale_toml_tombi_lint_options
|
||||
\ },
|
||||
\ {'command': ale#Escape('xxxinvalid') . ' lint --offline'},
|
||||
\ ale#fixers#tombi_lint#Fix(bufnr(''))
|
||||
|
||||
@@ -16,8 +16,3 @@ Execute(The project root should be detected correctly in Python projects):
|
||||
call ale#test#SetFilename('../test-files/toml/tombi/pyprojecttoml/subdir/file.ext')
|
||||
|
||||
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/toml/tombi/pyprojecttoml')
|
||||
|
||||
Execute(The project root should be empty when no project files can be detected):
|
||||
call ale#test#SetFilename('../test-files/dummy')
|
||||
|
||||
AssertLSPProject ''
|
||||
|
||||
Reference in New Issue
Block a user