diff options
author | w0rp <devw0rp@gmail.com> | 2018-05-28 17:38:14 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-05-28 17:38:14 +0100 |
commit | 18509195f575c5753d3b30ff87040674cca6ce01 (patch) | |
tree | 01cdfa7745491fe8664fdb8b2cfa26e8f1a05d13 /test/test_temporary_file_management.vader | |
parent | ce89d93e1c7b0e135ad88414fe1c556b4a4b3c3e (diff) | |
download | ale-18509195f575c5753d3b30ff87040674cca6ce01.zip |
#1524 Do not try to check buffers with empty filetypes
Diffstat (limited to 'test/test_temporary_file_management.vader')
-rw-r--r-- | test/test_temporary_file_management.vader | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/test_temporary_file_management.vader b/test/test_temporary_file_management.vader index ae2bf251..e248331c 100644 --- a/test/test_temporary_file_management.vader +++ b/test/test_temporary_file_management.vader @@ -1,4 +1,7 @@ Before: + Save g:ale_buffer_info + + let g:ale_buffer_info = {} let g:ale_run_synchronously = 1 let g:command = 'echo test' @@ -41,6 +44,8 @@ Before: \}) After: + Restore + if !empty(g:preserved_directory) call delete(g:preserved_directory, 'rf') endif @@ -111,3 +116,17 @@ Execute(ALE should create and delete directories for ale#engine#CreateDirectory( Assert !isdirectory(b:dir), 'The directory was not deleted' Assert !isdirectory(b:dir2), 'The second directory was not deleted' + +Execute(ale#engine#ManageFile should add the file even if the buffer info hasn't be set yet): + let g:ale_buffer_info = {} + call ale#engine#ManageFile(bufnr(''), '/foo/bar') + AssertEqual + \ ['/foo/bar'], + \ g:ale_buffer_info[bufnr('')].temporary_file_list + +Execute(ale#engine#ManageDirectory should add the directory even if the buffer info hasn't be set yet): + let g:ale_buffer_info = {} + call ale#engine#ManageDirectory(bufnr(''), '/foo/bar') + AssertEqual + \ ['/foo/bar'], + \ g:ale_buffer_info[bufnr('')].temporary_directory_list |