Try and make the temporary file test fail less on Windows
This commit is contained in:
parent
f235c4b3b9
commit
2a081e81db
@ -1,4 +1,23 @@
|
|||||||
Before:
|
Before:
|
||||||
|
Save g:ale_buffer_info
|
||||||
|
Save g:ale_echo_cursor
|
||||||
|
Save g:ale_enabled
|
||||||
|
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
|
||||||
|
|
||||||
|
" Disable the features we don't need to check.
|
||||||
|
let g:ale_buffer_info = {}
|
||||||
|
let g:ale_echo_cursor = 0
|
||||||
|
let g:ale_enabled = 1
|
||||||
|
let g:ale_run_synchronously = 1
|
||||||
|
let g:ale_set_highlights = 0
|
||||||
|
let g:ale_set_loclist = 0
|
||||||
|
let g:ale_set_quickfix = 0
|
||||||
|
let g:ale_set_signs = 0
|
||||||
|
|
||||||
let g:output = []
|
let g:output = []
|
||||||
|
|
||||||
function! TestCallback(buffer, output)
|
function! TestCallback(buffer, output)
|
||||||
@ -7,6 +26,7 @@ Before:
|
|||||||
return []
|
return []
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
call ale#linter#PreventLoading('foobar')
|
||||||
call ale#linter#Define('foobar', {
|
call ale#linter#Define('foobar', {
|
||||||
\ 'name': 'testlinter',
|
\ 'name': 'testlinter',
|
||||||
\ 'callback': 'TestCallback',
|
\ 'callback': 'TestCallback',
|
||||||
@ -15,6 +35,8 @@ Before:
|
|||||||
\})
|
\})
|
||||||
|
|
||||||
After:
|
After:
|
||||||
|
Restore
|
||||||
|
|
||||||
unlet! g:output
|
unlet! g:output
|
||||||
delfunction TestCallback
|
delfunction TestCallback
|
||||||
|
|
||||||
@ -29,9 +51,6 @@ Given foobar (Some imaginary filetype):
|
|||||||
Execute(ALE should be able to read the %t file):
|
Execute(ALE should be able to read the %t file):
|
||||||
AssertEqual 'foobar', &filetype
|
AssertEqual 'foobar', &filetype
|
||||||
|
|
||||||
" Sleep a little so the test passes more.
|
ALELint
|
||||||
sleep 100ms
|
|
||||||
call ale#Lint()
|
|
||||||
call ale#engine#WaitForJobs(2000)
|
|
||||||
|
|
||||||
AssertEqual ['foo', 'bar', 'baz'], g:output
|
AssertEqual ['foo', 'bar', 'baz'], g:output
|
||||||
|
Loading…
x
Reference in New Issue
Block a user