Clean up some test filenames and extraneous code
This commit is contained in:
parent
89d8f2a0bc
commit
dc99282f79
@ -8,10 +8,10 @@ Before:
|
|||||||
After:
|
After:
|
||||||
augroup! VaderTest
|
augroup! VaderTest
|
||||||
|
|
||||||
Given vim (Vimscript):
|
Given vim (Some vimscript):
|
||||||
set nocompatible
|
set nocompatible
|
||||||
Execute (Run ALE):
|
Execute (Lint it):
|
||||||
call ale#Lint()
|
call ale#Lint()
|
||||||
call ale#engine#WaitForJobs(2000)
|
call ale#engine#WaitForJobs(2000)
|
||||||
Then (Autocommand should have run):
|
Then (Autocommands should have run):
|
||||||
AssertEqual g:success, 1
|
AssertEqual g:success, 1
|
||||||
|
@ -11,7 +11,7 @@ Execute (Define a linter):
|
|||||||
Then (Get the defined linter):
|
Then (Get the defined linter):
|
||||||
AssertEqual [g:testlinter1], ale#linter#Get('testft')
|
AssertEqual [g:testlinter1], ale#linter#Get('testft')
|
||||||
|
|
||||||
Execute (Define a couple linters, filtering one.):
|
Execute (Define a couple linters, filtering one):
|
||||||
call ale#linter#Define('testft', g:testlinter1)
|
call ale#linter#Define('testft', g:testlinter1)
|
||||||
call ale#linter#Define('testft', g:testlinter2)
|
call ale#linter#Define('testft', g:testlinter2)
|
||||||
let g:ale_linters = {'testft': ['testlinter1']}
|
let g:ale_linters = {'testft': ['testlinter1']}
|
@ -1,18 +1,12 @@
|
|||||||
Before:
|
Before:
|
||||||
let g:ale_buffer_loclist_map = {}
|
let g:ale_buffer_loclist_map = {}
|
||||||
|
|
||||||
After:
|
|
||||||
let g:ale_buffer_loclist_map = {}
|
|
||||||
|
|
||||||
Execute (Count should be 0 when data is empty):
|
Execute (Count should be 0 when data is empty):
|
||||||
AssertEqual [0, 0], ale#statusline#Count(bufnr('%'))
|
AssertEqual [0, 0], ale#statusline#Count(bufnr('%'))
|
||||||
|
|
||||||
Before:
|
Before:
|
||||||
let g:ale_buffer_count_map = {'44': [1, 2]}
|
let g:ale_buffer_count_map = {'44': [1, 2]}
|
||||||
|
|
||||||
After:
|
|
||||||
let g:ale_buffer_loclist_map = {}
|
|
||||||
|
|
||||||
Execute (Count should read data from the cache):
|
Execute (Count should read data from the cache):
|
||||||
AssertEqual [1, 2], ale#statusline#Count(44)
|
AssertEqual [1, 2], ale#statusline#Count(44)
|
||||||
|
|
||||||
@ -25,9 +19,6 @@ Then (The cache should reflect the new data):
|
|||||||
Before:
|
Before:
|
||||||
let g:ale_buffer_loclist_map = {'1': [{'lnum': 1, 'bufnr': 1, 'vcol': 0, 'linter_name': 'testlinter', 'nr': -1, 'type': 'E', 'col': 1, 'text': 'Test Error'}]}
|
let g:ale_buffer_loclist_map = {'1': [{'lnum': 1, 'bufnr': 1, 'vcol': 0, 'linter_name': 'testlinter', 'nr': -1, 'type': 'E', 'col': 1, 'text': 'Test Error'}]}
|
||||||
|
|
||||||
After:
|
|
||||||
let g:ale_buffer_loclist_map = {}
|
|
||||||
|
|
||||||
Execute (Count should be match the loclist):
|
Execute (Count should be match the loclist):
|
||||||
AssertEqual [1, 0], ale#statusline#Count(1)
|
AssertEqual [1, 0], ale#statusline#Count(1)
|
||||||
|
|
||||||
@ -37,29 +28,22 @@ Execute (Output should be empty for non-existant buffer):
|
|||||||
Before:
|
Before:
|
||||||
let g:ale_statusline_format = ['%sE', '%sW', 'OKIE']
|
let g:ale_statusline_format = ['%sE', '%sW', 'OKIE']
|
||||||
|
|
||||||
After:
|
|
||||||
let g:ale_buffer_loclist_map = {}
|
|
||||||
|
|
||||||
Execute (Given some errors):
|
Execute (Given some errors):
|
||||||
call ale#statusline#Update(bufnr('%'), [{'type': 'E'}, {'type': 'E'}])
|
call ale#statusline#Update(bufnr('%'), [{'type': 'E'}, {'type': 'E'}])
|
||||||
|
|
||||||
Then (Statusline is formatted to the users preference):
|
Then (Statusline is formatted to the users preference):
|
||||||
AssertEqual '2E', ale#statusline#Status()
|
AssertEqual '2E', ale#statusline#Status()
|
||||||
|
|
||||||
Execute (Given some warnings):
|
Execute (Given some warnings):
|
||||||
call ale#statusline#Update(bufnr('%'), [{'type': 'W'}, {'type': 'W'}, {'type': 'W'}])
|
call ale#statusline#Update(bufnr('%'), [{'type': 'W'}, {'type': 'W'}, {'type': 'W'}])
|
||||||
|
|
||||||
Then (Statusline is formatted to the users preference):
|
Then (Statusline is formatted to the users preference):
|
||||||
AssertEqual '3W', ale#statusline#Status()
|
AssertEqual '3W', ale#statusline#Status()
|
||||||
|
|
||||||
Execute (Given some warnings, and errors):
|
Execute (Given some warnings, and errors):
|
||||||
call ale#statusline#Update(bufnr('%'), [{'type': 'E'}, {'type': 'W'}, {'type': 'W'}])
|
call ale#statusline#Update(bufnr('%'), [{'type': 'E'}, {'type': 'W'}, {'type': 'W'}])
|
||||||
|
|
||||||
Then (Statusline is formatted to the users preference):
|
Then (Statusline is formatted to the users preference):
|
||||||
AssertEqual '1E 2W', ale#statusline#Status()
|
AssertEqual '1E 2W', ale#statusline#Status()
|
||||||
|
|
||||||
Execute (Given a lack of data):
|
Execute (Given a lack of data):
|
||||||
call ale#statusline#Update(bufnr('%'), [])
|
call ale#statusline#Update(bufnr('%'), [])
|
||||||
|
|
||||||
Then (Statusline is formatted to the users preference):
|
Then (Statusline is formatted to the users preference):
|
||||||
AssertEqual 'OKIE', ale#statusline#Status()
|
AssertEqual 'OKIE', ale#statusline#Status()
|
Loading…
Reference in New Issue
Block a user