mirror of https://github.com/dense-analysis/ale
38 lines
1.3 KiB
Plaintext
38 lines
1.3 KiB
Plaintext
Before:
|
|
call ale#assert#SetUpLinterTest('terraform', 'terraform_ls')
|
|
|
|
After:
|
|
unlet! b:ale_terraform_terraform_executable
|
|
unlet! b:ale_terraform_ls_executable
|
|
unlet! b:ale_terraform_ls_options
|
|
|
|
call ale#assert#TearDownLinterTest()
|
|
|
|
Execute(The terraform-ls language should be correct):
|
|
AssertLSPLanguage 'terraform'
|
|
|
|
Execute(The default terraform-ls command should be correct):
|
|
AssertLinter 'terraform-ls', ale#Escape('terraform-ls') . ' serve'
|
|
|
|
Execute(The terrarform-ls executable and options should be configurable):
|
|
let b:ale_terraform_ls_executable = 'foo'
|
|
let b:ale_terraform_ls_options = '--bar'
|
|
|
|
AssertLinter 'foo', ale#Escape('foo') . ' serve --bar'
|
|
|
|
Execute(Should ignore non-absolute path custom terraform executables):
|
|
let b:ale_terraform_terraform_executable = 'terraform'
|
|
|
|
AssertLinter 'terraform-ls', ale#Escape('terraform-ls') . ' serve'
|
|
|
|
Execute(Should set absolute custom terraform executable):
|
|
let b:ale_terraform_terraform_executable = '/bin/terraform'
|
|
|
|
AssertLinter 'terraform-ls',
|
|
\ ale#Escape('terraform-ls') . ' serve -tf-exec /bin/terraform'
|
|
|
|
Execute(Should return nearest directory with .terraform if found in parent directory):
|
|
call ale#test#SetFilename('../test-files/terraform/main.tf')
|
|
|
|
AssertLSPProject ale#test#GetFilename('../test-files/terraform')
|