summaryrefslogtreecommitdiff
path: root/test/test_cleanup.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2016-10-17 20:42:50 +0100
committerw0rp <devw0rp@gmail.com>2016-10-17 20:42:50 +0100
commit7c2a16e149a0dbcdfcac6ee441474caaad1ef3b6 (patch)
treee8205de7100229dc05d7980ac45254a66a640c4a /test/test_cleanup.vader
parent1300fdc84bfb27ac455915536bb2a4012e3624a4 (diff)
downloadale-7c2a16e149a0dbcdfcac6ee441474caaad1ef3b6.zip
Add a test to check that buffer cleanup works.
Diffstat (limited to 'test/test_cleanup.vader')
-rw-r--r--test/test_cleanup.vader32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/test_cleanup.vader b/test/test_cleanup.vader
new file mode 100644
index 00000000..4f6827f4
--- /dev/null
+++ b/test/test_cleanup.vader
@@ -0,0 +1,32 @@
+Before:
+ let g:buffer = bufnr('%')
+ let g:ale_buffer_count_map = {
+ \ g:buffer: [1, 1],
+ \ 10347: [1, 1],
+ \}
+ let g:ale_buffer_loclist_map = {
+ \ g:buffer : [],
+ \ 10347: [],
+ \}
+ let g:ale_buffer_should_reset_map = {
+ \ g:buffer : 1,
+ \ 10347: 1,
+ \}
+ let g:ale_buffer_sign_dummy_map = {
+ \ g:buffer : 1,
+ \ 10347: 1,
+ \}
+
+After:
+ unlet! g:buffer
+ let g:ale_buffer_count_map = {}
+ let g:ale_buffer_loclist_map = {}
+ let g:ale_buffer_should_reset_map = {}
+ let g:ale_buffer_sign_dummy_map = {}
+
+Execute('ALE globals should be cleared when the buffer is closed.'):
+ :q!
+ AssertEqual {10347: [1, 1]}, g:ale_buffer_count_map
+ AssertEqual {10347: []}, g:ale_buffer_loclist_map
+ AssertEqual {10347: 1}, g:ale_buffer_should_reset_map
+ AssertEqual {10347: 1}, g:ale_buffer_sign_dummy_map