2017-06-28 14:27:02 +00:00
|
|
|
Before:
|
|
|
|
Save g:ale_puppet_puppetlint_executable
|
|
|
|
Save g:ale_puppet_puppetlint_options
|
|
|
|
|
|
|
|
" Use an invalid global executable, so we don't match it.
|
|
|
|
let g:ale_puppet_puppetlint_executable = 'xxxinvalid'
|
|
|
|
let g:ale_puppet_puppetlint_options = '--invalid'
|
|
|
|
|
2017-07-09 21:43:25 +00:00
|
|
|
call ale#test#SetDirectory('/testplugin/test/fixers')
|
2017-06-28 14:27:02 +00:00
|
|
|
|
|
|
|
After:
|
|
|
|
Restore
|
|
|
|
|
2017-07-09 21:43:25 +00:00
|
|
|
call ale#test#RestoreDirectory()
|
2017-06-28 14:27:02 +00:00
|
|
|
|
|
|
|
Execute(The puppetlint callback should return the correct default values):
|
2021-03-20 22:11:22 +00:00
|
|
|
silent execute 'file ' . fnameescape(g:dir . '/../test-files/puppet/dummy.pp')
|
2017-06-28 14:27:02 +00:00
|
|
|
|
|
|
|
AssertEqual
|
|
|
|
\ {'read_temporary_file': 1,
|
2017-10-01 19:23:41 +00:00
|
|
|
\ 'command': ale#Escape(g:ale_puppet_puppetlint_executable)
|
2017-06-28 14:27:02 +00:00
|
|
|
\ . ' ' . g:ale_puppet_puppetlint_options
|
|
|
|
\ . ' --fix %t' },
|
|
|
|
\ ale#fixers#puppetlint#Fix(bufnr(''))
|