summaryrefslogtreecommitdiff
path: root/test/test_ale_linter_get.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2016-10-11 23:48:43 +0100
committerw0rp <devw0rp@gmail.com>2016-10-11 23:48:43 +0100
commit1d2405f2bc9dc6485c7e0f57f06e316f8d3c855e (patch)
treed79117d6fbd6c79622a87a39f9961d671cbd94d8 /test/test_ale_linter_get.vader
parent78bcf96e345c9aa31412ae06e1da2bbe6a568ff5 (diff)
downloadale-1d2405f2bc9dc6485c7e0f57f06e316f8d3c855e.zip
Fix an ale:linters bug, and add a test for it.
Diffstat (limited to 'test/test_ale_linter_get.vader')
-rw-r--r--test/test_ale_linter_get.vader12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_ale_linter_get.vader b/test/test_ale_linter_get.vader
new file mode 100644
index 00000000..80691a59
--- /dev/null
+++ b/test/test_ale_linter_get.vader
@@ -0,0 +1,12 @@
+Before:
+ let g:ale_linters = {}
+
+After:
+ let g:ale_linters = {}
+
+Execute (Defaults should be correct):
+ AssertEqual [{'output_stream': 'stdout', 'name': 'eslint', 'executable': 'eslint', 'command': 'eslint -f unix --stdin --stdin-filename %s', 'callback': 'ale_linters#javascript#eslint#Handle'}, {'output_stream': 'stdout', 'name': 'jscs', 'executable': 'jscs', 'command': 'jscs -r unix -n -', 'callback': 'ale#handlers#HandleUnixFormatAsError'}, {'output_stream': 'stdout', 'name': 'jshint', 'executable': 'jshint', 'command_callback': 'ale_linters#javascript#jshint#GetCommand', 'callback': 'ale#handlers#HandleUnixFormatAsError'}], ale#linter#Get('javascript')
+
+Execute (You should be able to select only a few linters):
+ let g:ale_linters = {'javascript': ['eslint']}
+ AssertEqual [{'output_stream': 'stdout', 'name': 'eslint', 'executable': 'eslint', 'command': 'eslint -f unix --stdin --stdin-filename %s', 'callback': 'ale_linters#javascript#eslint#Handle'}], ale#linter#Get('javascript')