#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

@@ -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

View File

@@ -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'}])