summaryrefslogtreecommitdiff
path: root/test/command_callback/test_proto_command_callback.vader
blob: 76050c615ce34f6464266f41a354078606bc820e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Before:
  call ale#test#SetFilename('test.proto')

After:
  Restore

  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(''))