This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/command_callback/test_remark_lint_command_callbacks.vader

38 lines
1.3 KiB
Text
Raw Normal View History

2018-07-10 13:05:49 +00:00
Before:
" This is just one language for the linter.
call ale#assert#SetUpLinterTest('markdown', 'remark_lint')
After:
call ale#assert#TearDownLinterTest()
Execute(The default command should be correct):
AssertLinter 'remark',
2018-07-10 13:06:43 +00:00
\ ale#Escape('remark') . ' --no-stdout --no-color'
2018-07-10 13:05:49 +00:00
Execute(The executable should be configurable):
let b:ale_markdown_remark_lint_executable = 'foobar'
AssertLinter 'foobar',
2018-07-10 13:06:43 +00:00
\ ale#Escape('foobar') . ' --no-stdout --no-color'
2018-07-10 13:05:49 +00:00
Execute(The options should be configurable):
let b:ale_markdown_remark_lint_options = '--something'
AssertLinter 'remark',
2018-07-10 13:06:43 +00:00
\ ale#Escape('remark') . ' --something --no-stdout --no-color'
2018-07-10 13:05:49 +00:00
Execute(The local executable from .bin should be used if available):
call ale#test#SetFilename('remark_lint_paths/with_bin_path/foo.md')
AssertLinter
\ ale#path#Simplify(g:dir . '/remark_lint_paths/with_bin_path/node_modules/.bin/remark'),
\ ale#Escape(ale#path#Simplify(g:dir . '/remark_lint_paths/with_bin_path/node_modules/.bin/remark'))
2018-07-10 13:06:43 +00:00
\ . ' --no-stdout --no-color'
2018-07-10 13:05:49 +00:00
Execute(The global executable should be uesd if the option is set):
let b:ale_markdown_remark_lint_use_global = 1
call ale#test#SetFilename('remark_lint_paths/with_bin_path/foo.md')
AssertLinter 'remark', ale#Escape('remark')
2018-07-10 13:06:43 +00:00
\ . ' --no-stdout --no-color'