]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/test_alelint_autocmd.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '294584081929424aec883f90c7d6515b3743358d' as '.vim/bundle/vim-lsp-ale'
[etc/vim.git] / .vim / bundle / ale / test / test_alelint_autocmd.vader
1 Before:
2   let g:pre_success = 0
3   let g:post_success = 0
4   let g:ale_run_synchronously = 1
5
6   unlet! b:ale_linted
7
8 After:
9   let g:ale_run_synchronously = 0
10   let g:ale_buffer_info = {}
11
12   augroup VaderTest
13     autocmd!
14   augroup END
15
16   augroup! VaderTest
17
18 Given testft(An empty file):
19 Execute(Run a lint cycle, and check that a variable is set in the autocmd):
20   augroup VaderTest
21     autocmd!
22     autocmd User ALELintPre let g:pre_success = 1
23     autocmd User ALELintPost let g:post_success = 1
24   augroup END
25
26   call ale#Queue(0)
27
28   AssertEqual g:pre_success, 1
29   AssertEqual g:post_success, 1
30
31 Execute(b:ale_linted should be increased after each lint cycle):
32   AssertEqual get(b:, 'ale_linted'), 0
33
34   call ale#Queue(0)
35
36   AssertEqual get(b:, 'ale_linted'), 1
37
38   call ale#Queue(0)
39
40   AssertEqual get(b:, 'ale_linted'), 2