diff options
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. |