summaryrefslogtreecommitdiff
path: root/test/test_foodcritic_command_callback.vader
blob: 32beb92678021af01bd9e3963bb947f3ce535e56 (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
Before:
  let g:ale_chef_foodcritic_options = '-t ~F011'
  let g:ale_chef_foodcritic_executable = 'foodcritic'

  silent! cd /testplugin/test
  let g:dir = getcwd()

  runtime ale_linters/chef/foodcritic.vim

After:
  let g:ale_chef_foodcritic_options = ''
  let g:ale_chef_foodcritic_executable = ''

  silent execute 'cd ' . g:dir
  unlet! g:dir

  call ale#linter#Reset()

Execute(command line should be assembled correctly):

  AssertEqual
  \ 'foodcritic -t \~F011 %t',
  \ ale_linters#chef#foodcritic#GetCommand(bufnr(''))

  :q