summaryrefslogtreecommitdiff
path: root/test/test_temporary_file_management.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-02-06 22:00:11 +0000
committerw0rp <devw0rp@gmail.com>2019-02-06 22:00:11 +0000
commit81c73da3b98455c4ad11f32208dac3dcfa6e0da7 (patch)
tree4b52d8ceb590c51c7a6facf11dd638f1614502a9 /test/test_temporary_file_management.vader
parent3e11cbd18da3852fab5dee3f743bc60dc87f0775 (diff)
downloadale-81c73da3b98455c4ad11f32208dac3dcfa6e0da7.zip
#2132 - lint and fix with ale#command#Run
A new function is added here which will later be modified for public use in linter and fixer callbacks. All linting and fixing now goes through this new function, to prove that it works in all cases.
Diffstat (limited to 'test/test_temporary_file_management.vader')
-rw-r--r--test/test_temporary_file_management.vader10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test_temporary_file_management.vader b/test/test_temporary_file_management.vader
index b25da7ac..9fff1ace 100644
--- a/test/test_temporary_file_management.vader
+++ b/test/test_temporary_file_management.vader
@@ -70,7 +70,7 @@ Execute(ALE should delete managed files/directories appropriately after linting)
AssertEqual 'foobar', &filetype
call ale#Queue(0)
- call ale#engine#WaitForJobs(2000)
+ call ale#test#FlushJobs()
Assert !filereadable(g:filename), 'The temporary file was not deleted'
Assert !isdirectory(g:directory), 'The temporary directory was not deleted'
@@ -82,7 +82,7 @@ Execute(ALE should delete managed files even if no command is run):
let g:command = ''
call ale#Queue(0)
- call ale#engine#WaitForJobs(2000)
+ call ale#test#WaitForJobs(2000)
Assert !filereadable(g:filename), 'The temporary file was not deleted'
Assert !isdirectory(g:directory), 'The temporary directory was not deleted'
@@ -119,24 +119,26 @@ Execute(ALE should create and delete directories for ale#command#CreateDirectory
Assert !isdirectory(b:dir), 'The directory was not deleted'
Assert !isdirectory(b:dir2), 'The second directory was not deleted'
-Execute(ale#command#ManageFile should add the file even if the buffer info hasn't be set yet):
+Execute(ale#command#ManageFile should add the file even if the buffer info hasn't been set yet):
call ale#command#ManageFile(bufnr(''), '/foo/bar')
AssertEqual
\ {
\ bufnr(''): {
+ \ 'jobs': {},
\ 'file_list': ['/foo/bar'],
\ 'directory_list': [],
\ },
\ },
\ ale#command#GetData()
-Execute(ale#command#ManageDirectory should add the directory even if the buffer info hasn't be set yet):
+Execute(ale#command#ManageDirectory should add the directory even if the buffer info hasn't been set yet):
call ale#command#ManageDirectory(bufnr(''), '/foo/bar')
AssertEqual
\ {
\ bufnr(''): {
+ \ 'jobs': {},
\ 'file_list': [],
\ 'directory_list': ['/foo/bar'],
\ },