summaryrefslogtreecommitdiff
path: root/test/test_tflint_config_detection.vader
blob: 65c364ea7c51d95d020c758a662c54793d804c3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Before:
  call ale#test#SetDirectory('/testplugin/test')
  runtime ale_linters/terraform/tflint.vim

After:
  call ale#test#RestoreDirectory()
  call ale#linter#Reset()

Execute(adjacent config file should be found):
  call ale#test#SetFilename('tflint-test-files/foo/bar.tf')
  AssertEqual
  \ (
  \   ale#Escape('tflint')
  \   . ' --config '
  \   . ale#Escape(ale#path#Winify(g:dir . '/tflint-test-files/foo/.tflint.hcl'))
  \   . ' -f json %t'
  \ ),
  \ ale_linters#terraform#tflint#GetCommand(bufnr(''))