Fix #438 Create Java .class files for javac in a temporary directory

This commit is contained in:
w0rp
2017-03-31 20:14:53 +01:00
parent 7a8dbe1139
commit 7c736579b7
5 changed files with 78 additions and 0 deletions

View File

@@ -81,3 +81,23 @@ Execute(ALE should delete managed files when the buffer is removed):
Assert !filereadable(g:filename), 'The tempoary file was not deleted'
Assert !isdirectory(g:directory), 'The tempoary directory was not deleted'
Assert isdirectory(g:preserved_directory), 'The tempoary directory was not kept'
Execute(ALE should create and delete directories for ale#engine#CreateDirectory()):
call ale#engine#InitBufferInfo(bufnr('%'))
let b:dir = ale#engine#CreateDirectory(bufnr('%'))
let b:dir2 = ale#engine#CreateDirectory(bufnr('%'))
Assert isdirectory(b:dir), 'The directory was not created'
" We should get the correct file permissions.
" We want to ensure that the directory is not readable by 'other'
AssertEqual 'rwxr-x---', getfperm(b:dir)
" The two directories shouldn't be the same.
AssertNotEqual b:dir2, b:dir
call ale#cleanup#Buffer(bufnr('%'))
Assert !isdirectory(b:dir), 'The directory was not deleted'
Assert !isdirectory(b:dir2), 'The second directory was not deleted'