summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2017-02-09 18:56:40 +0000
committerGitHub <noreply@github.com>2017-02-09 18:56:40 +0000
commitb0190fd080a732f4c0354fc824c023f7ff7bd062 (patch)
tree30e106af06ad225c1a8984c39336cee70457ca3d /test
parentd8efd4fa73277908467ba59926428ca22703df27 (diff)
parent119695bd08eb17c340cd22c6a044de324d86d511 (diff)
downloadale-b0190fd080a732f4c0354fc824c023f7ff7bd062.zip
Merge pull request #306 from ahmedelgabri/standardjs
Add standard linter
Diffstat (limited to 'test')
-rw-r--r--test/test_standard_handler.vader44
1 files changed, 44 insertions, 0 deletions
diff --git a/test/test_standard_handler.vader b/test/test_standard_handler.vader
new file mode 100644
index 00000000..1d1b71c4
--- /dev/null
+++ b/test/test_standard_handler.vader
@@ -0,0 +1,44 @@
+Execute(The standard handler should parse lines correctly):
+ runtime ale_linters/javascript/standard.vim
+
+ AssertEqual
+ \ [
+ \ {
+ \ 'bufnr': 347,
+ \ 'lnum': 47,
+ \ 'vcol': 0,
+ \ 'col': 14,
+ \ 'text': 'Expected indentation of 2 spaces but found 4.',
+ \ 'type': 'E',
+ \ 'nr': -1,
+ \ },
+ \ {
+ \ 'bufnr': 347,
+ \ 'lnum': 56,
+ \ 'vcol': 0,
+ \ 'col': 41,
+ \ 'text': 'Strings must use singlequote.',
+ \ 'type': 'E',
+ \ 'nr': -1,
+ \ },
+ \ {
+ \ 'bufnr': 347,
+ \ 'lnum': 13,
+ \ 'vcol': 0,
+ \ 'col': 3,
+ \ 'text': 'Parsing error: Unexpected token',
+ \ 'type': 'E',
+ \ 'nr': -1,
+ \ },
+ \ ],
+ \ ale_linters#javascript#standard#Handle(347, [
+ \ 'This line should be ignored completely',
+ \ '/path/to/some-filename.js:47:14: Expected indentation of 2 spaces but found 4.',
+ \ '/path/to/some-filename.js:56:41: Strings must use singlequote.',
+ \ 'This line should be ignored completely',
+ \ '/path/to/some-filename.js:13:3: Parsing error: Unexpected token',
+ \ ])
+
+After:
+ call ale#linter#Reset()
+