summaryrefslogtreecommitdiff
path: root/test/handler
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2020-07-21 12:47:33 +0100
committerGitHub <noreply@github.com>2020-07-21 12:47:33 +0100
commitf4668c751fba1af496d933af9fdcf1cf162a26f4 (patch)
tree80b05de5e073f426400fc34da274b9cdb86f6fac /test/handler
parent70ab831001dbe806fc5af3f33727f1fa32e3ff13 (diff)
parent7b9855f1fe811f4ec80bdeb81b5ab9b6d9249a49 (diff)
downloadale-f4668c751fba1af496d933af9fdcf1cf162a26f4.zip
Merge pull request #3070 from hsanson/2732-add-bashate-support
Fix 2732 - Add bashate support
Diffstat (limited to 'test/handler')
-rw-r--r--test/handler/test_bashate_handler.vader36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/handler/test_bashate_handler.vader b/test/handler/test_bashate_handler.vader
new file mode 100644
index 00000000..b61bb956
--- /dev/null
+++ b/test/handler/test_bashate_handler.vader
@@ -0,0 +1,36 @@
+Before:
+ runtime ale_linters/sh/bashate.vim
+
+After:
+ call ale#linter#Reset()
+
+Execute(The bashate handler should handle basic errors):
+ AssertEqual
+ \ [
+ \ {
+ \ 'lnum': 777,
+ \ 'col': 1,
+ \ 'text': 'E003 Indent not multiple of 4',
+ \ },
+ \ {
+ \ 'lnum': 783,
+ \ 'col': 1,
+ \ 'text': 'E020 Function declaration not in format ^function name {$',
+ \ },
+ \ {
+ \ 'lnum': 786,
+ \ 'col': 1,
+ \ 'text': 'E010 The "do" should be on same line as for',
+ \ },
+ \ {
+ \ 'lnum': 791,
+ \ 'col': 1,
+ \ 'text': 'E006 Line too long',
+ \ },
+ \ ],
+ \ ale_linters#sh#bashate#Handle(bufnr(''), [
+ \ 'run:777:1: E003 Indent not multiple of 4',
+ \ 'run:783:1: E020 Function declaration not in format ^function name {$',
+ \ 'run:786:1: E010 The "do" should be on same line as for',
+ \ 'run:791:1: E006 Line too long',
+ \ ])