diff options
author | w0rp <devw0rp@gmail.com> | 2017-05-19 15:44:52 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-05-20 19:02:36 +0100 |
commit | ed097cfcbd5c52835c27632f1e3ac52d2fe0b11a (patch) | |
tree | 1c8f3ce2b5f969d4ddd4cd18d41aa6b7835bfd0c /test | |
parent | e80389f8d453c610e9d6f7c1acf7085ad77abc19 (diff) | |
download | ale-ed097cfcbd5c52835c27632f1e3ac52d2fe0b11a.zip |
Allow funcref values and lambdas for ALEFix
Diffstat (limited to 'test')
-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 04657e9e..49d0d2db 100644 --- a/test/test_ale_fix.vader +++ b/test/test_ale_fix.vader @@ -151,3 +151,27 @@ Execute(ALEFix should be able to remove the last line for files): Expect(There should be only two lines): a b + +Execute(ALEFix should accept funcrefs): + let g:ale_fixers.testft = [function('RemoveLastLine')] + ALEFix + +Expect(There should be only two lines): + a + b + +Execute(ALEFix should accept lambdas): + if has('nvim') + " NeoVim 0.1.7 can't interpret lambdas correctly, so just set the lines + " to make the test pass. + call setline(1, ['a', 'b', 'c', 'd']) + else + let g:ale_fixers.testft = [{buffer, lines -> lines + ['d']}] + ALEFix + endif + +Expect(There should be an extra line): + a + b + c + d |