mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-21 19:51:17 +08:00
#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:
@@ -40,11 +40,6 @@ Execute(0 signs should be set when the max is 0):
|
||||
|
||||
AssertEqual [], SetNProblems(42)
|
||||
|
||||
Execute(1 signs should be set when the max is 1):
|
||||
let g:ale_max_signs = 1
|
||||
|
||||
AssertEqual [1], SetNProblems(42)
|
||||
|
||||
Execute(10 signs should be set when the max is 10):
|
||||
let g:ale_max_signs = 10
|
||||
|
||||
|
||||
@@ -133,11 +133,11 @@ Execute(ale#sign#GetSignName should return the right sign names):
|
||||
\])
|
||||
|
||||
Given testft(A file with warnings/errors):
|
||||
foo
|
||||
bar
|
||||
baz
|
||||
fourth line
|
||||
fifth line
|
||||
Foo
|
||||
Bar
|
||||
Baz
|
||||
Fourth line
|
||||
Fifth line
|
||||
|
||||
Execute(The current signs should be set for running a job):
|
||||
ALELint
|
||||
@@ -277,26 +277,6 @@ Execute(Signs should be upgraded correctly):
|
||||
\ sort(ParseSigns())
|
||||
|
||||
Execute(It should be possible to clear signs with empty lists):
|
||||
let g:loclist = [
|
||||
\ {'bufnr': bufnr(''), 'lnum': 16, 'col': 2, 'type': 'E', 'text': 'f'},
|
||||
\]
|
||||
|
||||
call ale#sign#SetSigns(bufnr(''), g:loclist)
|
||||
|
||||
AssertEqual
|
||||
\ [
|
||||
\ ['16', '1000001', 'ALEErrorSign'],
|
||||
\ ],
|
||||
\ sort(ParseSigns())
|
||||
|
||||
call ale#sign#SetSigns(bufnr(''), [])
|
||||
|
||||
AssertEqual [], ParseSigns()
|
||||
|
||||
Execute(No exceptions should be thrown when setting signs for invalid buffers):
|
||||
call ale#sign#SetSigns(123456789, [{'lnum': 15, 'col': 2, 'type': 'W', 'text': 'e'}])
|
||||
|
||||
Execute(Signs should be removed when lines have multiple sign IDs on them):
|
||||
" We can fail to remove signs if there are multiple signs on one line,
|
||||
" say after deleting lines in Vim, etc.
|
||||
if has('nvim-0.4.2') || has('patch-8.1.614')
|
||||
@@ -313,3 +293,6 @@ Execute(Signs should be removed when lines have multiple sign IDs on them):
|
||||
|
||||
call ale#sign#SetSigns(bufnr(''), [])
|
||||
AssertEqual [], ParseSigns()
|
||||
|
||||
Execute(No exceptions should be thrown when setting signs for invalid buffers):
|
||||
call ale#sign#SetSigns(123456789, [{'lnum': 15, 'col': 2, 'type': 'W', 'text': 'e'}])
|
||||
|
||||
Reference in New Issue
Block a user