Try the smoke test a few times over in NeoVim 0.3, which fails randomly
This commit is contained in:
parent
c9a6b04dc7
commit
0de3d24338
1 changed files with 28 additions and 13 deletions
|
@ -33,6 +33,10 @@ Before:
|
||||||
After:
|
After:
|
||||||
Restore
|
Restore
|
||||||
|
|
||||||
|
unlet! g:i
|
||||||
|
unlet! g:results
|
||||||
|
unlet! g:expected_results
|
||||||
|
|
||||||
delfunction TestCallback
|
delfunction TestCallback
|
||||||
delfunction TestCallback2
|
delfunction TestCallback2
|
||||||
call ale#engine#Cleanup(bufnr(''))
|
call ale#engine#Cleanup(bufnr(''))
|
||||||
|
@ -135,17 +139,28 @@ Execute(Previous errors should be removed when linters change):
|
||||||
\ 'command': has('win32') ? 'echo baz boz' : '/bin/sh -c ''echo baz boz''',
|
\ 'command': has('win32') ? 'echo baz boz' : '/bin/sh -c ''echo baz boz''',
|
||||||
\})
|
\})
|
||||||
|
|
||||||
call ale#Lint()
|
let g:expected_results = [{
|
||||||
call ale#engine#WaitForJobs(2000)
|
\ 'bufnr': bufnr('%'),
|
||||||
|
\ 'lnum': 3,
|
||||||
|
\ 'vcol': 0,
|
||||||
|
\ 'col': 4,
|
||||||
|
\ 'text': 'baz boz',
|
||||||
|
\ 'type': 'E',
|
||||||
|
\ 'nr': -1,
|
||||||
|
\ 'pattern': '',
|
||||||
|
\ 'valid': 1,
|
||||||
|
\}]
|
||||||
|
|
||||||
AssertEqual [{
|
" Try the test a few times over in NeoVim 0.3, where tests fail randomly.
|
||||||
\ 'bufnr': bufnr('%'),
|
for g:i in range(has('nvim-0.3') ? 5 : 1)
|
||||||
\ 'lnum': 3,
|
call ale#Lint()
|
||||||
\ 'vcol': 0,
|
call ale#engine#WaitForJobs(2000)
|
||||||
\ 'col': 4,
|
|
||||||
\ 'text': 'baz boz',
|
let g:results = getloclist(0)
|
||||||
\ 'type': 'E',
|
|
||||||
\ 'nr': -1,
|
if g:results == g:expected_results
|
||||||
\ 'pattern': '',
|
break
|
||||||
\ 'valid': 1,
|
endif
|
||||||
\ }], getloclist(0)
|
endfor
|
||||||
|
|
||||||
|
AssertEqual g:expected_results, g:results
|
||||||
|
|
Reference in a new issue