#4454 Clean up more tests and code

* Remove some tests we no longer need
* Delete blocks of redundant code
* Compress some tests together to simplify them
* Remove a little code for ancient linter versions
* Escape more executables we didn't escape before
* Rename a deno option that didn't match our conventions
This commit is contained in:
w0rp
2023-09-16 22:22:01 +01:00
parent 4b11cf21dc
commit ae1d051504
98 changed files with 257 additions and 674 deletions

View File

@@ -1,32 +1,19 @@
Before:
call ale#assert#SetUpLinterTest('nasm', 'nasm')
let b:command_tail =
\ ' -X gnu -I %s:h' . (has('win32') ? '\' : '/') . ' %s -o ' . (has('win32') ? 'NUL' : '/dev/null')
let b:command_tail_opt =
\ ' -X gnu -I %s:h' . (has('win32') ? '\' : '/') . ' -w+orphan-labels %s -o ' . (has('win32') ? 'NUL' : '/dev/null')
After:
unlet! b:command_tail
unlet! b:command_tail_opt
call ale#assert#TearDownLinterTest()
Execute(The executable should be configurable):
AssertLinter 'nasm', ale#Escape('nasm') . b:command_tail,
let b:ale_nasm_nasm_executable = '~/nasm'
AssertLinter '~/nasm', ale#Escape('~/nasm') . b:command_tail
Execute(The options should be configurable):
let b:ale_nasm_nasm_options = '-w-macro-params'
Execute(The default nasm command should be correct):
AssertLinter 'nasm', ale#Escape('nasm')
\ . ' -X gnu -I %s:h' . (has('win32') ? '\' : '/')
\ . ' -w-macro-params %s -o ' . (has('win32') ? 'NUL' : '/dev/null')
\ . ' %s -o ' . (has('win32') ? 'NUL' : '/dev/null')
Execute(The options should be used in command):
let b:ale_nasm_nasm_options = '-w+orphan-labels'
Execute(The nasm executable and options should be configurable):
let b:ale_nasm_nasm_executable = '~/nasm'
let b:ale_nasm_nasm_options = '-w-macro-params'
AssertLinter 'nasm', ale#Escape('nasm') . b:command_tail_opt
AssertLinter '~/nasm', ale#Escape('~/nasm')
\ . ' -X gnu -I %s:h' . (has('win32') ? '\' : '/')
\ . ' -w-macro-params'
\ . ' %s -o ' . (has('win32') ? 'NUL' : '/dev/null')