]> git.madduck.net Git - etc/vim.git/blob - test/test_alejobstarted_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:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / test / test_alejobstarted_autocmd.vader
1 Before:
2   Save g:ale_buffer_info
3
4   let g:job_started_success = 0
5   let g:ale_run_synchronously = 1
6
7   unlet! b:ale_linted
8
9   function! TestCallback(buffer, output)
10     return []
11   endfunction
12
13   call ale#linter#PreventLoading('testft')
14   call ale#linter#Define('testft', {
15   \ 'name': 'testlinter',
16   \ 'callback': 'TestCallback',
17   \ 'executable': has('win32') ? 'cmd' : 'true',
18   \ 'command': 'true',
19   \})
20
21 After:
22   Restore
23
24   let g:ale_run_synchronously = 0
25
26   augroup VaderTest
27     autocmd!
28   augroup END
29
30   augroup! VaderTest
31
32   unlet! g:job_started_success
33
34   delfunction TestCallback
35   call ale#linter#Reset()
36
37 Given testft (An empty file):
38 Execute(Run a lint cycle with an actual job to check for ALEJobStarted):
39   augroup VaderTest
40     autocmd!
41     autocmd User ALEJobStarted let g:job_started_success = 1
42   augroup END
43
44   ALELint
45
46   AssertEqual g:job_started_success, 1