diff options
author | w0rp <devw0rp@gmail.com> | 2018-06-28 13:59:52 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-06-28 13:59:52 +0100 |
commit | fc041ae0903bb252ec42551511e040ca827c0b41 (patch) | |
tree | b243a1eb134fa1202ef0166505e5898dfec1489d /test | |
parent | d581fca35e2a09afc68dd43baa290c695f8a66a7 (diff) | |
download | ale-fc041ae0903bb252ec42551511e040ca827c0b41.zip |
Make a test which can fail randomly synchronous instead
Diffstat (limited to 'test')
-rw-r--r-- | test/sign/test_linting_sets_signs.vader | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/test/sign/test_linting_sets_signs.vader b/test/sign/test_linting_sets_signs.vader index 2f9be7b2..3ccecf45 100644 --- a/test/sign/test_linting_sets_signs.vader +++ b/test/sign/test_linting_sets_signs.vader @@ -3,6 +3,23 @@ Given foobar (Some imaginary filetype): var y = 3 Before: + Save g:ale_buffer_info + Save g:ale_echo_cursor + Save g:ale_run_synchronously + Save g:ale_set_highlights + Save g:ale_set_loclist + Save g:ale_set_quickfix + Save g:ale_set_signs + + let g:ale_buffer_info = {} + let g:ale_run_synchronously = 1 + let g:ale_set_signs = 1 + " Disable features we don't need for these tests. + let g:ale_set_quickfix = 0 + let g:ale_set_loclist = 0 + let g:ale_set_highlights = 0 + let g:ale_echo_cursor = 0 + sign unplace * function! TestCallback(buffer, output) @@ -37,18 +54,14 @@ Before: \ 'command': has('win32') ? 'echo foo bar' : '/bin/sh -c ''echo foo bar''', \}) - After: delfunction TestCallback delfunction CollectSigns sign unplace * - let g:ale_buffer_info = {} - call ale#engine#Cleanup(bufnr('')) call ale#linter#Reset() Execute(The signs should be updated after linting is done): - call ale#Lint() - call ale#engine#WaitForJobs(2000) + ALELint AssertEqual [['1', 'ALEWarningSign'], ['2', 'ALEErrorSign']], CollectSigns() |