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 call ale#assert#SetUpLinterTest('thrift', 'thrift')
3 let b:suffix = ' -out ' . ale#Escape('TEMP_DIR') . ' %t'
5 function! GetCommand(buffer) abort
6 call ale#engine#InitBufferInfo(a:buffer)
7 let l:command = ale_linters#thrift#thrift#GetCommand(a:buffer)
8 call ale#engine#Cleanup(a:buffer)
10 let l:split_command = split(l:command)
11 let l:index = index(l:split_command, '-out')
14 let l:split_command[l:index + 1] = 'TEMP'
17 return join(l:split_command)
22 delfunction GetCommand
23 call ale#assert#TearDownLinterTest()
25 Execute(The default command should be correct):
26 AssertLinter 'thrift', ale#Escape('thrift') . ' --gen cpp -I . -strict' . b:suffix
28 Execute(The executable should be configurable):
29 let b:ale_thrift_thrift_executable = 'foobar'
31 AssertLinter 'foobar', ale#Escape('foobar') . ' --gen cpp -I . -strict' . b:suffix
33 Execute(The list of generators should be configurable):
34 let b:ale_thrift_thrift_generators = ['java', 'py:dynamic']
36 AssertLinter 'thrift', ale#Escape('thrift')
37 \ . ' --gen java --gen py:dynamic -I . -strict' . b:suffix
39 let b:ale_thrift_thrift_generators = []
41 AssertLinter 'thrift', ale#Escape('thrift') . ' --gen cpp -I . -strict' . b:suffix
43 Execute(The list of include paths should be configurable):
44 let b:ale_thrift_thrift_includes = ['included/path']
46 AssertLinter 'thrift', ale#Escape('thrift')
47 \ . ' --gen cpp -I included/path -strict' . b:suffix
49 Execute(The string of compiler options should be configurable):
50 let b:ale_thrift_thrift_options = '-strict --allow-64bit-consts'
52 AssertLinter 'thrift', ale#Escape('thrift')
53 \ . ' --gen cpp -I . -strict --allow-64bit-consts' . b:suffix