All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
2 Save g:ale_cs_mcsc_source
4 unlet! g:ale_cs_mcsc_source
6 call ale#test#SetDirectory('/testplugin/test/handler')
7 call ale#test#SetFilename('Test.cs')
9 runtime ale_linters/cs/mcsc.vim
12 unlet! g:ale_cs_mcsc_source
14 call ale#test#RestoreDirectory()
15 call ale#linter#Reset()
17 Execute(The mcs handler should work with the default of the buffer's directory):
23 \ 'text': '; expected',
26 \ 'filename': ale#path#Simplify(g:dir . '/Test.cs'),
29 \ ale_linters#cs#mcsc#Handle(bufnr(''), [
30 \ 'Test.cs(12,29): error CS1001: ; expected',
31 \ 'Compilation failed: 2 error(s), 1 warnings',
34 Execute(The mcs handler should handle cannot find symbol errors):
35 let g:ale_cs_mcsc_source = '/home/foo/project/bar'
42 \ 'text': '; expected',
45 \ 'filename': ale#path#Simplify('/home/foo/project/bar/Test.cs'),
50 \ 'text': 'Unexpected processor directive (no #if for this #endif)',
53 \ 'filename': ale#path#Simplify('/home/foo/project/bar/Test.cs'),
58 \ 'text': 'some warning',
61 \ 'filename': ale#path#Simplify('/home/foo/project/bar/Test.cs'),
64 \ ale_linters#cs#mcsc#Handle(bufnr(''), [
65 \ 'Test.cs(12,29): error CS1001: ; expected',
66 \ 'Test.cs(101,0): error CS1028: Unexpected processor directive (no #if for this #endif)',
67 \ 'Test.cs(10,12): warning CS0123: some warning',
68 \ 'Compilation failed: 2 error(s), 1 warnings',
71 Execute(The mcsc handler should handle non file specific compiler errors without reporting overal status report as error):
72 let g:ale_cs_mcsc_source = '/home/foo/project/bar'
79 \ 'text': 'No files to compile were specified',
82 \ 'filename': '<mcs>',
85 \ ale_linters#cs#mcsc#Handle(bufnr(''), [
86 \ 'error CS2008: No files to compile were specified',
87 \ 'Compilation failed: 1 error(s), 0 warnings',