diff options
author | w0rp <devw0rp@gmail.com> | 2018-07-11 13:46:13 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-07-11 13:46:13 +0100 |
commit | 0de3d24338b03d6d487e1df2d43c8ec3a03634cf (patch) | |
tree | 20eb4bb279a52c311481264be9b4ff4ac3d2aa0f /test/smoke_test.vader | |
parent | c9a6b04dc7c1d9f4d24676ee5ef9670dd0cd1bae (diff) | |
download | ale-0de3d24338b03d6d487e1df2d43c8ec3a03634cf.zip |
Try the smoke test a few times over in NeoVim 0.3, which fails randomly
Diffstat (limited to 'test/smoke_test.vader')
-rw-r--r-- | test/smoke_test.vader | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/test/smoke_test.vader b/test/smoke_test.vader index 7f9dfd03..35aa0323 100644 --- a/test/smoke_test.vader +++ b/test/smoke_test.vader @@ -33,6 +33,10 @@ Before: After: Restore + unlet! g:i + unlet! g:results + unlet! g:expected_results + delfunction TestCallback delfunction TestCallback2 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''', \}) - call ale#Lint() - call ale#engine#WaitForJobs(2000) + let g:expected_results = [{ + \ 'bufnr': bufnr('%'), + \ 'lnum': 3, + \ 'vcol': 0, + \ 'col': 4, + \ 'text': 'baz boz', + \ 'type': 'E', + \ 'nr': -1, + \ 'pattern': '', + \ 'valid': 1, + \}] + + " Try the test a few times over in NeoVim 0.3, where tests fail randomly. + for g:i in range(has('nvim-0.3') ? 5 : 1) + call ale#Lint() + call ale#engine#WaitForJobs(2000) - AssertEqual [{ - \ 'bufnr': bufnr('%'), - \ 'lnum': 3, - \ 'vcol': 0, - \ 'col': 4, - \ 'text': 'baz boz', - \ 'type': 'E', - \ 'nr': -1, - \ 'pattern': '', - \ 'valid': 1, - \ }], getloclist(0) + let g:results = getloclist(0) + + if g:results == g:expected_results + break + endif + endfor + + AssertEqual g:expected_results, g:results |