diff options
author | w0rp <w0rp@users.noreply.github.com> | 2018-03-18 16:37:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-18 16:37:16 +0000 |
commit | b08fdd16b879527885d3d8f9e21ba688b5f18763 (patch) | |
tree | e27cb56d84dbe449fff9e3514c87e600feecf849 /test | |
parent | 92e6e4d1ba482a4d2d89d850f660c67ccf8a28eb (diff) | |
parent | 302f69e933b85628c688a1b16eab5dd2e7976e99 (diff) | |
download | ale-b08fdd16b879527885d3d8f9e21ba688b5f18763.zip |
Merge pull request #1248 from Carpetsmoker/autocmd-fixer
Add ALEFixPre and ALEFixPost events
Diffstat (limited to 'test')
-rw-r--r-- | test/fix/test_ale_fix.vader | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/fix/test_ale_fix.vader b/test/fix/test_ale_fix.vader index 5b66c92c..0321cbae 100644 --- a/test/fix/test_ale_fix.vader +++ b/test/fix/test_ale_fix.vader @@ -17,6 +17,14 @@ Before: \ 'testft': [], \} + let g:pre_success = 0 + let g:post_success = 0 + augroup VaderTest + autocmd! + autocmd User ALEFixPre let g:pre_success = 1 + autocmd User ALEFixPost let g:post_success = 1 + augroup end + if !has('win32') let &shell = '/bin/bash' endif @@ -171,6 +179,7 @@ After: unlet! g:ale_emulate_job_failure unlet! b:ale_fixers unlet! b:ale_fix_on_save + augroup! VaderTest delfunction AddCarets delfunction AddDollars delfunction DoNothing @@ -664,3 +673,9 @@ Expect(The lines in the JSON should be used): x y z + +Execute(ALEFix should apply autocmds): + let g:ale_fixers.testft = ['AddCarets'] + ALEFix + AssertEqual g:pre_success, 1 + AssertEqual g:post_success, 1 |