From dc99282f7919dd3b30fdb5971ee75234ec8a8196 Mon Sep 17 00:00:00 2001 From: Bjorn Neergaard Date: Sat, 22 Oct 2016 08:48:04 -0500 Subject: [PATCH] Clean up some test filenames and extraneous code --- test/test_alelint_autocmd.vader | 6 +++--- ...ter_get.vader => test_linter_retrieval.vader} | 2 +- ...le_statusline.vader => test_statusline.vader} | 16 ---------------- 3 files changed, 4 insertions(+), 20 deletions(-) rename test/{test_ale_linter_get.vader => test_linter_retrieval.vader} (97%) rename test/{test_ale_statusline.vader => test_statusline.vader} (90%) diff --git a/test/test_alelint_autocmd.vader b/test/test_alelint_autocmd.vader index a08ac00..86772b6 100644 --- a/test/test_alelint_autocmd.vader +++ b/test/test_alelint_autocmd.vader @@ -8,10 +8,10 @@ Before: After: augroup! VaderTest -Given vim (Vimscript): +Given vim (Some vimscript): set nocompatible -Execute (Run ALE): +Execute (Lint it): call ale#Lint() call ale#engine#WaitForJobs(2000) -Then (Autocommand should have run): +Then (Autocommands should have run): AssertEqual g:success, 1 diff --git a/test/test_ale_linter_get.vader b/test/test_linter_retrieval.vader similarity index 97% rename from test/test_ale_linter_get.vader rename to test/test_linter_retrieval.vader index c8f67cb..5dadf6b 100644 --- a/test/test_ale_linter_get.vader +++ b/test/test_linter_retrieval.vader @@ -11,7 +11,7 @@ Execute (Define a linter): Then (Get the defined linter): AssertEqual [g:testlinter1], ale#linter#Get('testft') -Execute (Define a couple linters, filtering one.): +Execute (Define a couple linters, filtering one): call ale#linter#Define('testft', g:testlinter1) call ale#linter#Define('testft', g:testlinter2) let g:ale_linters = {'testft': ['testlinter1']} diff --git a/test/test_ale_statusline.vader b/test/test_statusline.vader similarity index 90% rename from test/test_ale_statusline.vader rename to test/test_statusline.vader index 8fa8aaa..da4c693 100644 --- a/test/test_ale_statusline.vader +++ b/test/test_statusline.vader @@ -1,18 +1,12 @@ Before: let g:ale_buffer_loclist_map = {} -After: - let g:ale_buffer_loclist_map = {} - Execute (Count should be 0 when data is empty): AssertEqual [0, 0], ale#statusline#Count(bufnr('%')) Before: let g:ale_buffer_count_map = {'44': [1, 2]} -After: - let g:ale_buffer_loclist_map = {} - Execute (Count should read data from the cache): AssertEqual [1, 2], ale#statusline#Count(44) @@ -25,9 +19,6 @@ Then (The cache should reflect the new data): Before: let g:ale_buffer_loclist_map = {'1': [{'lnum': 1, 'bufnr': 1, 'vcol': 0, 'linter_name': 'testlinter', 'nr': -1, 'type': 'E', 'col': 1, 'text': 'Test Error'}]} -After: - let g:ale_buffer_loclist_map = {} - Execute (Count should be match the loclist): AssertEqual [1, 0], ale#statusline#Count(1) @@ -37,29 +28,22 @@ Execute (Output should be empty for non-existant buffer): Before: let g:ale_statusline_format = ['%sE', '%sW', 'OKIE'] -After: - let g:ale_buffer_loclist_map = {} - Execute (Given some errors): call ale#statusline#Update(bufnr('%'), [{'type': 'E'}, {'type': 'E'}]) - Then (Statusline is formatted to the users preference): AssertEqual '2E', ale#statusline#Status() Execute (Given some warnings): call ale#statusline#Update(bufnr('%'), [{'type': 'W'}, {'type': 'W'}, {'type': 'W'}]) - Then (Statusline is formatted to the users preference): AssertEqual '3W', ale#statusline#Status() Execute (Given some warnings, and errors): call ale#statusline#Update(bufnr('%'), [{'type': 'E'}, {'type': 'W'}, {'type': 'W'}]) - Then (Statusline is formatted to the users preference): AssertEqual '1E 2W', ale#statusline#Status() Execute (Given a lack of data): call ale#statusline#Update(bufnr('%'), []) - Then (Statusline is formatted to the users preference): AssertEqual 'OKIE', ale#statusline#Status()