diff options
author | w0rp <devw0rp@gmail.com> | 2020-08-28 14:02:05 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2020-08-28 14:02:05 +0100 |
commit | 34e409ea21baa017776b84ec0620eea9f6ec429c (patch) | |
tree | 46af9d9f297763767e3f5c46c5334df729df3502 /test/test_deferred_command_string.vader | |
parent | b8c0ac2e6126d2245f4281c286387b4dd1847178 (diff) | |
download | ale-34e409ea21baa017776b84ec0620eea9f6ec429c.zip |
Close #3285 - lint_file is now dynamic
`lint_file` can now be computed dynamically with a callback function,
which can return a deferred result, as per `ale#command#Run`. This
allows linters to dynamically switch between checking files on disk,
or checking code on the fly.
Some tests have been fixed on Windows.
Diffstat (limited to 'test/test_deferred_command_string.vader')
-rw-r--r-- | test/test_deferred_command_string.vader | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_deferred_command_string.vader b/test/test_deferred_command_string.vader index 026be6fe..173b6bb2 100644 --- a/test/test_deferred_command_string.vader +++ b/test/test_deferred_command_string.vader @@ -12,7 +12,7 @@ Before: call ale#linter#Define('foobar', { \ 'name': 'lint_file_linter', \ 'callback': 'LintFileCallback', - \ 'executable': 'echo', + \ 'executable': has('win32') ? 'cmd' : 'echo', \ 'command': {b -> ale#command#Run(b, 'echo', {-> ale#command#Run(b, 'echo', {-> 'foo'})})}, \ 'read_buffer': 0, \}) @@ -28,7 +28,7 @@ After: Given foobar (Some imaginary filetype): Execute(It should be possible to compute an executable to check based on the result of commands): - AssertLinter 'echo', 'foo' + AssertLinter has('win32') ? 'cmd' : 'echo', 'foo' ALELint call ale#test#FlushJobs() @@ -40,7 +40,7 @@ Execute(It should be possible to compute an executable to check based on the res Execute(It handle the deferred command failing): let g:ale_emulate_job_failure = 1 - AssertLinter 'echo', 0 + AssertLinter has('win32') ? 'cmd' : 'echo', 0 ALELint call ale#test#FlushJobs() |