summaryrefslogtreecommitdiff
path: root/test/handler/test_bashate_handler.vader
diff options
context:
space:
mode:
authorBartek thindil Jasicki <thindil@laeran.pl>2020-07-24 10:38:29 +0200
committerBartek thindil Jasicki <thindil@laeran.pl>2020-07-24 10:38:29 +0200
commite06060a31fbdc58221234e9344023f3372e93629 (patch)
treee54a42f0ce93a420077ea9aa2444486665add338 /test/handler/test_bashate_handler.vader
parent0f45d3d01d2f91d5b9ce3f01de6c288c6f2ca441 (diff)
parent68b484a49fe2f5cc29ebccca0a3da48b31073ada (diff)
downloadale-e06060a31fbdc58221234e9344023f3372e93629.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'test/handler/test_bashate_handler.vader')
-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',
+ \ ])