diff options
author | w0rp <devw0rp@gmail.com> | 2018-03-03 13:27:19 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-03-03 13:27:19 +0000 |
commit | 565ffa0dc5e2fe53663f7228c05ad927c190b9e6 (patch) | |
tree | 53f894eee6a185a46746b528f969d139e4785a37 /test/command_callback | |
parent | 857723e7d569c8260d95d2ce261fbf064e5bfa9f (diff) | |
download | ale-565ffa0dc5e2fe53663f7228c05ad927c190b9e6.zip |
Use the configured mdl executable, escape it in the command, and add test for it
Diffstat (limited to 'test/command_callback')
-rw-r--r-- | test/command_callback/test_markdown_mdl_command_callback.vader | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/command_callback/test_markdown_mdl_command_callback.vader b/test/command_callback/test_markdown_mdl_command_callback.vader new file mode 100644 index 00000000..3a68a4b2 --- /dev/null +++ b/test/command_callback/test_markdown_mdl_command_callback.vader @@ -0,0 +1,28 @@ +Before: + Save g:ale_markdown_mdl_executable + Save g:ale_markdown_mdl_options + + unlet! g:ale_markdown_mdl_executable + unlet! g:ale_markdown_mdl_options + + runtime ale_linters/markdown/mdl.vim + +After: + Restore + + call ale#linter#Reset() + +Execute(The default command should be correct): + AssertEqual ale_linters#markdown#mdl#GetExecutable(bufnr('')), 'mdl' + AssertEqual + \ ale_linters#markdown#mdl#GetCommand(bufnr('')), + \ ale#Escape('mdl') + +Execute(The executable and options should be configurable): + let g:ale_markdown_mdl_executable = 'foo bar' + let g:ale_markdown_mdl_options = '--wat' + + AssertEqual ale_linters#markdown#mdl#GetExecutable(bufnr('')), 'foo bar' + AssertEqual + \ ale_linters#markdown#mdl#GetCommand(bufnr('')), + \ ale#Escape('foo bar') . ' --wat' |