diff options
-rw-r--r-- | test/test_alelint_autocmd.vader | 6 | ||||
-rw-r--r-- | test/test_linter_retrieval.vader (renamed from test/test_ale_linter_get.vader) | 2 | ||||
-rw-r--r-- | test/test_statusline.vader (renamed from test/test_ale_statusline.vader) | 16 |
3 files changed, 4 insertions, 20 deletions
diff --git a/test/test_alelint_autocmd.vader b/test/test_alelint_autocmd.vader index a08ac00e..86772b61 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 index c8f67cb8..5dadf6bc 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 index 8fa8aaab..da4c693f 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() |