summaryrefslogtreecommitdiff
path: root/test/handler/test_mcsc_handler.vader
blob: 5f4c133c484cc74f7e6467d2875e5bedd4b15ac9 (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
43
44
Before:
  Save g:ale_cs_mcsc_source

  unlet! g:ale_cs_mcsc_source

  runtime ale_linters/cs/mcsc.vim

After:
  unlet! g:ale_cs_mcsc_source
  call ale#linter#Reset()

Execute(The mcs handler should handle cannot find symbol errors):
  let g:ale_cs_mcsc_source='/home/foo/project/bar'

  AssertEqual
  \ [
  \   {
  \     'lnum': 12,
  \     'col' : 29,
  \     'text': 'error CS1001: ; expected',
  \     'type': 'E',
  \     'filename': ale#path#Winify('/home/foo/project/bar/Test.cs', 'add_drive'),
  \   },
  \   {
  \     'lnum': 101,
  \     'col': 0,
  \     'text': 'error CS1028: Unexpected processor directive (no #if for this #endif)',
  \     'type': 'E',
  \     'filename': ale#path#Winify('/home/foo/project/bar/Test.cs', 'add_drive'),
  \   },
  \   {
  \     'lnum': 10,
  \     'col': 12,
  \     'text': 'warning CS0123: some warning',
  \     'type': 'W',
  \     'filename': ale#path#Winify('/home/foo/project/bar/Test.cs', 'add_drive'),
  \   },
  \ ],
  \ ale_linters#cs#mcsc#Handle(347, [
  \   'Test.cs(12,29): error CS1001: ; expected',
  \   'Test.cs(101,0): error CS1028: Unexpected processor directive (no #if for this #endif)',
  \   'Test.cs(10,12): warning CS0123: some warning',
  \   'Compilation failed: 2 error(s), 1 warnings',
  \ ])