2017-09-26 07:19:53 +00:00
|
|
|
Before:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#SetUpLinterTest('cs', 'mcsc')
|
2017-09-26 07:19:53 +00:00
|
|
|
|
|
|
|
After:
|
2018-07-15 17:24:53 +00:00
|
|
|
call ale#assert#TearDownLinterTest()
|
2017-09-26 07:19:53 +00:00
|
|
|
|
2017-12-19 17:34:34 +00:00
|
|
|
Execute(The mcsc linter should return the correct default command):
|
2021-03-01 20:11:10 +00:00
|
|
|
AssertLinterCwd expand('%:p:h')
|
|
|
|
AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')
|
2017-09-26 07:19:53 +00:00
|
|
|
|
|
|
|
Execute(The options should be be used in the command):
|
|
|
|
let g:ale_cs_mcsc_options = '-pkg:dotnet'
|
|
|
|
|
2021-03-01 20:11:10 +00:00
|
|
|
AssertLinter 'mcs', 'mcs -unsafe -pkg:dotnet -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')
|
2017-09-26 07:19:53 +00:00
|
|
|
|
2022-10-29 11:56:09 +00:00
|
|
|
Execute(The source path should be be used in the command):
|
2017-12-19 17:34:34 +00:00
|
|
|
let g:ale_cs_mcsc_source = '../foo/bar'
|
2017-09-26 07:19:53 +00:00
|
|
|
|
2021-03-01 20:11:10 +00:00
|
|
|
AssertLinterCwd '../foo/bar'
|
|
|
|
AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')
|
2017-09-26 07:19:53 +00:00
|
|
|
|
2022-10-29 11:56:09 +00:00
|
|
|
Execute(The list of search paths for assemblies should be be used in the command if not empty):
|
2017-10-18 22:42:51 +00:00
|
|
|
let g:ale_cs_mcsc_assembly_path = ['/usr/lib/mono', '../foo/bar']
|
2017-09-26 07:19:53 +00:00
|
|
|
|
2021-03-01 20:11:10 +00:00
|
|
|
AssertLinter 'mcs', 'mcs -unsafe'
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . ' -lib:' . ale#Escape('/usr/lib/mono') . ',' . ale#Escape('../foo/bar')
|
|
|
|
\ . ' -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')
|
2017-09-26 07:19:53 +00:00
|
|
|
|
2017-10-18 22:42:51 +00:00
|
|
|
let g:ale_cs_mcsc_assembly_path = []
|
2017-09-26 07:19:53 +00:00
|
|
|
|
2021-03-01 20:11:10 +00:00
|
|
|
AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')
|
2017-09-26 07:19:53 +00:00
|
|
|
|
|
|
|
Execute(The list of assemblies should be be used in the command if not empty):
|
2017-10-18 22:42:51 +00:00
|
|
|
let g:ale_cs_mcsc_assemblies = ['foo.dll', 'bar.dll']
|
2017-09-26 07:19:53 +00:00
|
|
|
|
2021-03-01 20:11:10 +00:00
|
|
|
AssertLinter 'mcs', 'mcs -unsafe'
|
2018-07-15 17:24:53 +00:00
|
|
|
\ . ' -r:' . ale#Escape('foo.dll') . ',' . ale#Escape('bar.dll')
|
|
|
|
\ . ' -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')
|
2017-09-26 07:19:53 +00:00
|
|
|
|
2017-10-18 22:42:51 +00:00
|
|
|
let g:ale_cs_mcsc_assemblies = []
|
2017-09-26 07:19:53 +00:00
|
|
|
|
2021-03-01 20:11:10 +00:00
|
|
|
AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')
|