diff options
author | Takashi WADA <twada@amy.hi-ho.ne.jp> | 2018-07-10 22:05:49 +0900 |
---|---|---|
committer | WADA Takashi <twada@amy.hi-ho.ne.jp> | 2018-07-16 18:33:21 +0900 |
commit | f369aa65a22e2aa2c4d7e6a1d30dcbcf2ad9ea4a (patch) | |
tree | b49ce4aaea037665950336ec528c3ef15234b52d /test | |
parent | fcd62342d531bdeacbd41a8dfa6163301f1fdf9b (diff) | |
download | ale-f369aa65a22e2aa2c4d7e6a1d30dcbcf2ad9ea4a.zip |
Support remark-lint installed locally
Diffstat (limited to 'test')
-rwxr-xr-x | test/command_callback/remark_lint_paths/with_bin_path/node_modules/.bin/remark | 0 | ||||
-rw-r--r-- | test/command_callback/test_remark_lint_command_callbacks.vader | 37 |
2 files changed, 37 insertions, 0 deletions
diff --git a/test/command_callback/remark_lint_paths/with_bin_path/node_modules/.bin/remark b/test/command_callback/remark_lint_paths/with_bin_path/node_modules/.bin/remark new file mode 100755 index 00000000..e69de29b --- /dev/null +++ b/test/command_callback/remark_lint_paths/with_bin_path/node_modules/.bin/remark diff --git a/test/command_callback/test_remark_lint_command_callbacks.vader b/test/command_callback/test_remark_lint_command_callbacks.vader new file mode 100644 index 00000000..20d72fca --- /dev/null +++ b/test/command_callback/test_remark_lint_command_callbacks.vader @@ -0,0 +1,37 @@ +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', + \ ale#Escape('remark') . ' --no-stdout --no-color %s' + +Execute(The executable should be configurable): + let b:ale_markdown_remark_lint_executable = 'foobar' + + AssertLinter 'foobar', + \ ale#Escape('foobar') . ' --no-stdout --no-color %s' + +Execute(The options should be configurable): + let b:ale_markdown_remark_lint_options = '--something' + + AssertLinter 'remark', + \ ale#Escape('remark') . ' --something --no-stdout --no-color %s' + +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')) + \ . ' --no-stdout --no-color %s' + +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') + \ . ' --no-stdout --no-color %s' |