summaryrefslogtreecommitdiff
path: root/test/linter/test_ansible_lint.vader
blob: a3fbde23164f2c7dc113dc45376f5fd453af75d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Before:
  call ale#assert#SetUpLinterTest('ansible', 'ansible_lint')
  let b:bin_dir = has('win32') ? 'Scripts' : 'bin'

After:
  unlet! b:bin_dir
  unlet! b:executable
  call ale#assert#TearDownLinterTest()

Execute(The ansible_lint version <5.0.0 command callback should return default string):
  GivenCommandOutput ['v4.1.2']
  AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' -p %t'

Execute(The ansible_lint version >=5.0.0 command callback should return default string):
  GivenCommandOutput ['v5.1.2']
  AssertLinter 'ansible-lint', ale#Escape('ansible-lint') . ' --parseable-severity -x yaml'

Execute(The ansible_lint executable should be configurable):
  let g:ale_ansible_ansible_lint_executable = '~/.local/bin/ansible-lint'
  GivenCommandOutput ['v4.1.2']
  AssertLinter '~/.local/bin/ansible-lint',
  \ ale#Escape('~/.local/bin/ansible-lint') . ' -p %t'