diff options
author | w0rp <devw0rp@gmail.com> | 2017-10-30 22:19:57 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-10-30 22:19:57 +0000 |
commit | 50f7ad35529e0672e4161e3c74be5cb87196a2f1 (patch) | |
tree | 3feeaa166f4a52a5cb4962cb890622168ba50547 /test/test_ale_fix.vader | |
parent | 1575b3d7ddc5c2844d987f2abb0a5defe493972b (diff) | |
download | ale-50f7ad35529e0672e4161e3c74be5cb87196a2f1.zip |
#857 - Add b:ale_fix_on_save for controlling fixing on save for specific buffers
Diffstat (limited to 'test/test_ale_fix.vader')
-rw-r--r-- | test/test_ale_fix.vader | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/test_ale_fix.vader b/test/test_ale_fix.vader index 9968c4a5..fac9a25b 100644 --- a/test/test_ale_fix.vader +++ b/test/test_ale_fix.vader @@ -77,6 +77,7 @@ After: unlet! g:ale_set_lists_synchronously unlet! g:ale_emulate_job_failure unlet! b:ale_fixers + unlet! b:ale_fix_on_save delfunction AddCarets delfunction AddDollars delfunction DoNothing @@ -412,6 +413,29 @@ Expect(There should be only two lines): a b +Execute(b:ale_fix_on_save = 1 should override g:ale_fix_on_save = 0): + let g:ale_fix_on_save = 0 + let b:ale_fix_on_save = 1 + + let g:ale_fixers.testft = ['RemoveLastLineOneArg'] + call ale#events#SaveEvent(bufnr('')) + +Expect(There should be only two lines): + a + b + +Execute(b:ale_fix_on_save = 0 should override g:ale_fix_on_save = 1): + let g:ale_fix_on_save = 1 + let b:ale_fix_on_save = 0 + + let g:ale_fixers.testft = ['RemoveLastLineOneArg'] + call ale#events#SaveEvent(bufnr('')) + +Expect(The lines should be the same): + a + b + c + Execute(ALEFix functions returning jobs should be able to accept one argument): if has('win32') " Just skip this test on Windows, we can't run it. |