summaryrefslogtreecommitdiff
path: root/test/handler
diff options
context:
space:
mode:
authorMichael F. Schönitzer <michael@schoenitzer.de>2022-12-06 13:44:10 +0100
committerGitHub <noreply@github.com>2022-12-06 21:44:10 +0900
commit42a17dec166783dc50b7105a0837f715fe9bd432 (patch)
treef674bdd720f393809e6064c1f55b1fee4fbcfb35 /test/handler
parentcad8f8e68338221e157adb1fffbe8eb16c430fe0 (diff)
downloadale-42a17dec166783dc50b7105a0837f715fe9bd432.zip
Handle empty answer of ansible-lint (#4373)
* Handle empty answer of ansible-lint The variable a:lines might be empty if ansible-lint exited early, in that case json_decode would trow an error. * Use ales JSON decode function
Diffstat (limited to 'test/handler')
-rw-r--r--test/handler/test_ansible_lint_handler.vader6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/handler/test_ansible_lint_handler.vader b/test/handler/test_ansible_lint_handler.vader
index e1a2ccbb..fbc38f30 100644
--- a/test/handler/test_ansible_lint_handler.vader
+++ b/test/handler/test_ansible_lint_handler.vader
@@ -93,3 +93,9 @@ Execute (The ansible-lint handler should ignore errors from other files):
\ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [5, 1, 2], [
\ '/foo/bar/roles/test_playbook.yml:6: [command-instead-of-module] [VERY_LOW] curl used in place of get_url or uri module',
\ ])
+
+Execute (The ansible-lint handler should work with empty input):
+ AssertEqual
+ \ [
+ \ ],
+ \ ale_linters#ansible#ansible_lint#Handle(bufnr(''), [6, 0, 0], [])