blob: 30f067eaf776b368618e0376923caa04252ee9fb (
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
|
Before:
Save g:ale_cs_mcs_options
unlet! g:ale_cs_mcs_options
runtime ale_linters/cs/mcs.vim
let b:command_tail = ' -unsafe --parse'
After:
Restore
unlet! b:command_tail
unlet! b:ale_cs_mcs_options
call ale#linter#Reset()
Execute(Check for proper default command):
let b:command = ale_linters#cs#mcs#GetCommand(bufnr(''))
let b:command = substitute(b:command,'\s\+',' ','g')
AssertEqual
\ b:command,
\ 'mcs -unsafe --parse %t'
Execute(The options should be be used in the command):
let b:ale_cs_mcs_options = '-pkg:dotnet'
let b:command = ale_linters#cs#mcs#GetCommand(bufnr(''))
let b:command = substitute(b:command,'\s\+',' ','g')
AssertEqual
\ b:command,
\ 'mcs' . b:command_tail . ' ' . b:ale_cs_mcs_options . ' %t',
|