blob: 03a69f393cc8fdfa9c106c91020a537a1b978c66 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
Before:
Save g:ale_idris_idris_executable
Save g:ale_idris_idris_options
unlet! g:ale_idris_idris_executable
unlet! b:ale_idris_idris_executable
unlet! g:ale_idris_idris_options
unlet! b:ale_idris_idris_options
runtime ale_linters/idris/idris.vim
After:
Restore
unlet! b:command_tail
unlet! b:ale_idris_idris_executable
unlet! b:ale_idris_idris_options
call ale#linter#Reset()
Execute(The executable should be configurable):
AssertEqual 'idris', ale_linters#idris#idris#GetExecutable(bufnr(''))
let b:ale_idris_idris_executable = 'foobar'
AssertEqual 'foobar', ale_linters#idris#idris#GetExecutable(bufnr(''))
Execute(The executable should be used in the command):
AssertEqual
\ ale#Escape('idris') . ' --total --warnpartial --warnreach --warnipkg --check %s',
\ ale_linters#idris#idris#GetCommand(bufnr(''))
let b:ale_idris_idris_executable = 'foobar'
AssertEqual
\ ale#Escape('foobar') . ' --total --warnpartial --warnreach --warnipkg --check %s',
\ ale_linters#idris#idris#GetCommand(bufnr(''))
Execute(The options should be configurable):
let b:ale_idris_idris_options = '--something'
AssertEqual
\ ale#Escape('idris') . ' --something --check %s',
\ ale_linters#idris#idris#GetCommand(bufnr(''))
|