diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_ale_info.vader | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/test/test_ale_info.vader b/test/test_ale_info.vader index 29c19b8e..c723dba3 100644 --- a/test/test_ale_info.vader +++ b/test/test_ale_info.vader @@ -145,9 +145,12 @@ Before: After: Restore + if exists('g:info_test_file') && filereadable(g:info_test_file) + call delete(g:info_test_file) + endif + unlet! g:testlinter1 unlet! g:testlinter2 - unlet! b:ale_history unlet! b:ale_linters unlet! g:output @@ -160,6 +163,7 @@ After: unlet! g:ale_testft2_testlinter2_foo unlet! b:ale_testft2_testlinter2_foo unlet! g:ale_testft2_testlinter2_bar + unlet! g:info_test_file delfunction CheckInfo call ale#test#RestoreDirectory() @@ -333,10 +337,6 @@ Execute (ALEInfo should return appropriately named global variables): \) Execute (ALEInfoToFile should write to a file correctly): - if filereadable(g:dir . '/ale-info-test-file') - call delete(g:dir . '/ale-info-test-file') - endif - let g:ale_testft_testlinter1_foo = 'abc' let g:ale_testft_testlinter1_bar = ['abc'] let g:ale_testft2_testlinter2_foo = 123 @@ -345,7 +345,8 @@ Execute (ALEInfoToFile should write to a file correctly): call ale#linter#Define('testft', g:testlinter1) call ale#linter#Define('testft2', g:testlinter2) - execute 'ALEInfoToFile ' . fnameescape(g:dir . '/ale-info-test-file') + let g:info_test_file = tempname() + execute 'ALEInfoToFile ' . fnameescape(g:info_test_file) AssertEqual \ [ @@ -364,7 +365,7 @@ Execute (ALEInfoToFile should write to a file correctly): \ ] \ + g:globals_lines \ + g:command_header, - \ readfile(g:dir . '/ale-info-test-file') + \ readfile(g:info_test_file) Given testft.testft2 (Empty buffer with two filetypes): Execute (ALEInfo should buffer-local linter variables): |