diff options
author | w0rp <w0rp@users.noreply.github.com> | 2018-01-12 20:43:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-12 20:43:43 +0000 |
commit | f6af75aac46f2d4ac72ea8256ac871f7cbf158f6 (patch) | |
tree | 984394716f10a5198d6c282541008049e2b80c42 /test | |
parent | e18aba1d7e82c1baf5654312d4d42787e4ecd42e (diff) | |
parent | b5a5cdf920a9875650b021c8116ac02b739a9e9e (diff) | |
download | ale-f6af75aac46f2d4ac72ea8256ac871f7cbf158f6.zip |
Merge pull request #1268 from bbannier/master
Make it possible to inject flags of protoc invocation.
Diffstat (limited to 'test')
-rw-r--r-- | test/command_callback/test_proto_command_callback.vader | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/command_callback/test_proto_command_callback.vader b/test/command_callback/test_proto_command_callback.vader index 2fd7775e..76050c61 100644 --- a/test/command_callback/test_proto_command_callback.vader +++ b/test/command_callback/test_proto_command_callback.vader @@ -1,14 +1,21 @@ Before: - call ale#test#SetDirectory('/testplugin/test/command_callback') call ale#test#SetFilename('test.proto') After: Restore - call ale#test#RestoreDirectory() + unlet! b:ale_proto_protoc_gen_lint_options + call ale#linter#Reset() Execute(The default command should be correct): AssertEqual \ 'protoc' . ' -I ' . ale#Escape(getcwd()) . ' --lint_out=. ' . '%s', \ ale_linters#proto#protoc_gen_lint#GetCommand(bufnr('')) + +Execute(The callback should include any additional options): + let b:ale_proto_protoc_gen_lint_options = '--some-option' + + AssertEqual + \ 'protoc' . ' -I ' . ale#Escape(getcwd()) . ' --some-option --lint_out=. ' . '%s', + \ ale_linters#proto#protoc_gen_lint#GetCommand(bufnr('')) |