summaryrefslogtreecommitdiff
path: root/test/test_cleanup.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-12-19 15:35:57 +0000
committerw0rp <devw0rp@gmail.com>2017-12-19 15:35:57 +0000
commitf74e22b938798a6bd64e6fa55754c3e7e28285dd (patch)
treebec21085182ce55e0666a92f1593739f0b2a0dc7 /test/test_cleanup.vader
parentd2bea5c3101e9f198492efb8ca294e63e62415a4 (diff)
downloadale-f74e22b938798a6bd64e6fa55754c3e7e28285dd.zip
Clean up ALE linter buffer data when buffers are deleted, not unloaded
Diffstat (limited to 'test/test_cleanup.vader')
-rw-r--r--test/test_cleanup.vader23
1 files changed, 11 insertions, 12 deletions
diff --git a/test/test_cleanup.vader b/test/test_cleanup.vader
index 23e5bcf0..232874aa 100644
--- a/test/test_cleanup.vader
+++ b/test/test_cleanup.vader
@@ -1,15 +1,14 @@
-Before:
- let g:buffer = bufnr('%')
+After:
+ unlet! g:buffer
+ let g:ale_buffer_info = {}
- let g:ale_buffer_info = {
- \ g:buffer : {'temporary_file_list': [], 'temporary_directory_list': []},
- \ 10347: {'temporary_file_list': [], 'temporary_directory_list': []},
- \}
+Execute('ALE globals should be cleared when the buffer is deleted):
+ new
-After:
- unlet! g:buffer
- let g:ale_buffer_info = {}
+ let g:ale_buffer_info = {
+ \ bufnr(''): {'temporary_file_list': [], 'temporary_directory_list': []},
+ \ 10347: {'temporary_file_list': [], 'temporary_directory_list': []},
+ \}
-Execute('ALE globals should be cleared when the buffer is closed.'):
- :q!
- AssertEqual {10347: {'temporary_file_list': [], 'temporary_directory_list': []}}, g:ale_buffer_info
+ bdelete
+ AssertEqual {10347: {'temporary_file_list': [], 'temporary_directory_list': []}}, g:ale_buffer_info