diff options
author | w0rp <w0rp@users.noreply.github.com> | 2019-05-29 23:28:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-29 23:28:50 +0100 |
commit | 4f02edc3f882e6cb77b8dc03bc118172cfe5d857 (patch) | |
tree | 453ba538361d3d78e5acea00a11638a5f396e48b /test/handler | |
parent | 166435dbf15f122fb59fc4ca36998ddf671e48de (diff) | |
parent | 88fa0b9294c6e907e8e2e8bee2ca593dff91b473 (diff) | |
download | ale-4f02edc3f882e6cb77b8dc03bc118172cfe5d857.zip |
Merge pull request #2529 from maxwell-k/terraform_linter
Add a terraform linter
Diffstat (limited to 'test/handler')
-rwxr-xr-x | test/handler/test_terraform_handler.vader | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/handler/test_terraform_handler.vader b/test/handler/test_terraform_handler.vader new file mode 100755 index 00000000..976ce12a --- /dev/null +++ b/test/handler/test_terraform_handler.vader @@ -0,0 +1,34 @@ +Before: + " Load the file which defines the linter. + runtime ale_linters/terraform/terraform.vim + +After: + " Unload all linters again. + call ale#linter#Reset() + +Execute(The output should be correct): + AssertEqual + \ [ + \ { + \ 'lnum': 1, + \ 'col': 20, + \ 'type': 'E', + \ 'text': 'illegal char', + \ }, + \ { + \ 'lnum': 2, + \ 'col': 14, + \ 'type': 'E', + \ 'text': 'literal not terminated', + \ }, + \ { + \ 'lnum': 1, + \ 'type': 'E', + \ 'text': 'object expected closing RBRACE got: EOF', + \ }, + \ ], + \ ale_linters#terraform#terraform#Handle(bufnr(''), [ + \ 'Error running fmt: In <standard input>: At 1:20: illegal char', + \ 'Error running fmt: In <standard input>: At 2:14: literal not terminated', + \ 'Error running fmt: In <standard input>: object expected closing RBRACE got: EOF', + \ ]) |