X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/test/linter/test_pymarkdown.vader?ds=sidebyside diff --git a/.vim/bundle/ale/test/linter/test_pymarkdown.vader b/.vim/bundle/ale/test/linter/test_pymarkdown.vader new file mode 100644 index 00000000..2bfb2387 --- /dev/null +++ b/.vim/bundle/ale/test/linter/test_pymarkdown.vader @@ -0,0 +1,50 @@ +Before: + call ale#assert#SetUpLinterTest('markdown', 'pymarkdown') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The pymarkdown command callback should return default string): + AssertLinter 'pymarkdown', ale#Escape('pymarkdown') . ' scan-stdin' + +Execute(The pycodestyle command callback should allow options): + let g:markdown_pymarkdown_options = '--exclude=test*.py' + +Execute(The pymarkdown executable should be configurable): + let g:ale_markdown_pymarkdown_executable = '~/.local/bin/pymarkdown' + + AssertLinter '~/.local/bin/pymarkdown', + \ ale#Escape('~/.local/bin/pymarkdown') . ' scan-stdin' + +Execute(Setting executable to 'pipenv' appends 'run pymarkdown'): + let g:ale_markdown_pymarkdown_executable = 'path/to/pipenv' + + AssertLinter 'path/to/pipenv', + \ ale#Escape('path/to/pipenv') . ' run pymarkdown scan-stdin' + +Execute(Pipenv is detected when markdown_pymarkdown_auto_pipenv is set): + let g:ale_markdown_pymarkdown_auto_pipenv = 1 + call ale#test#SetFilename('../test-files/python/pipenv/whatever.py') + + AssertLinter 'pipenv', + \ ale#Escape('pipenv') . ' run pymarkdown scan-stdin' + +Execute(Setting executable to 'poetry' appends 'run pymarkdown'): + let g:ale_markdown_pymarkdown_executable = 'path/to/poetry' + + AssertLinter 'path/to/poetry', + \ ale#Escape('path/to/poetry') . ' run pymarkdown scan-stdin' + +Execute(Poetry is detected when markdown_pymarkdown_auto_poetry is set): + let g:ale_markdown_pymarkdown_auto_poetry = 1 + call ale#test#SetFilename('../test-files/python/poetry/whatever.py') + + AssertLinter 'poetry', + \ ale#Escape('poetry') . ' run pymarkdown scan-stdin' + +Execute(uv is detected when markdown_pymarkdown_auto_uv is set): + let g:ale_markdown_pymarkdown_auto_uv = 1 + call ale#test#SetFilename('../test-files/python/uv/whatever.py') + + AssertLinter 'uv', + \ ale#Escape('uv') . ' run pymarkdown scan-stdin'