This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/command_callback/test_terraform_tflint_command_callback.vader
2017-10-26 19:37:04 +01:00

32 lines
906 B
Text

Before:
Save g:ale_terraform_tflint_executable
Save g:ale_terraform_tflint_options
runtime ale_linters/terraform/tflint.vim
After:
Restore
call ale#linter#Reset()
Execute(The default executable should be configurable):
AssertEqual 'tflint', ale_linters#terraform#tflint#GetExecutable(bufnr(''))
let g:ale_terraform_tflint_executable = 'asdf'
AssertEqual 'asdf', ale_linters#terraform#tflint#GetExecutable(bufnr(''))
Execute(The default command should be good):
let g:ale_terraform_tflint_executable = 'tflint'
AssertEqual
\ ale#Escape('tflint') . ' -f json',
\ ale_linters#terraform#tflint#GetCommand(bufnr(''))
Execute(Overriding things should work):
let g:ale_terraform_tflint_executable = 'fnord'
let g:ale_terraform_tflint_options = '--whatever'
AssertEqual
\ ale#Escape('fnord') . ' --whatever -f json',
\ ale_linters#terraform#tflint#GetCommand(bufnr(''))