summaryrefslogtreecommitdiff
path: root/test/linter/test_cs_mcsc.vader
blob: e784cf1556db2d692f8cba6db74a99271ebff673 (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:
  call ale#assert#SetUpLinterTest('cs', 'mcsc')

After:
  call ale#assert#TearDownLinterTest()

Execute(The mcsc linter should return the correct default command):
  AssertLinterCwd expand('%:p:h')
  AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')

Execute(The options should be be used in the command):
  let g:ale_cs_mcsc_options = '-pkg:dotnet'

  AssertLinter 'mcs', 'mcs -unsafe -pkg:dotnet -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')

Execute(The souce path should be be used in the command):
  let g:ale_cs_mcsc_source = '../foo/bar'

  AssertLinterCwd '../foo/bar'
  AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')

Execute(The list of search pathes for assemblies should be be used in the command if not empty):
  let g:ale_cs_mcsc_assembly_path = ['/usr/lib/mono', '../foo/bar']

  AssertLinter 'mcs', 'mcs -unsafe'
  \ . ' -lib:' . ale#Escape('/usr/lib/mono') . ',' . ale#Escape('../foo/bar')
  \ . ' -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')

  let g:ale_cs_mcsc_assembly_path = []

  AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')

Execute(The list of assemblies should be be used in the command if not empty):
  let g:ale_cs_mcsc_assemblies = ['foo.dll', 'bar.dll']

  AssertLinter 'mcs', 'mcs -unsafe'
  \ . ' -r:' . ale#Escape('foo.dll') . ',' . ale#Escape('bar.dll')
  \ . ' -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')

  let g:ale_cs_mcsc_assemblies = []

  AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs')