]> git.madduck.net Git - etc/vim.git/blob - test/linter/test_pymarkdown.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / test / linter / test_pymarkdown.vader
1 Before:
2   call ale#assert#SetUpLinterTest('markdown', 'pymarkdown')
3
4 After:
5   call ale#assert#TearDownLinterTest()
6
7 Execute(The pymarkdown command callback should return default string):
8   AssertLinter 'pymarkdown', ale#Escape('pymarkdown') . ' scan-stdin'
9
10 Execute(The pycodestyle command callback should allow options):
11   let g:markdown_pymarkdown_options = '--exclude=test*.py'
12
13 Execute(The pymarkdown executable should be configurable):
14   let g:ale_markdown_pymarkdown_executable = '~/.local/bin/pymarkdown'
15
16   AssertLinter '~/.local/bin/pymarkdown',
17   \ ale#Escape('~/.local/bin/pymarkdown') . ' scan-stdin'
18
19 Execute(Setting executable to 'pipenv' appends 'run pymarkdown'):
20   let g:ale_markdown_pymarkdown_executable = 'path/to/pipenv'
21
22   AssertLinter 'path/to/pipenv',
23   \ ale#Escape('path/to/pipenv') . ' run pymarkdown scan-stdin'
24
25 Execute(Pipenv is detected when markdown_pymarkdown_auto_pipenv is set):
26   let g:ale_markdown_pymarkdown_auto_pipenv = 1
27   call ale#test#SetFilename('../test-files/python/pipenv/whatever.py')
28
29   AssertLinter 'pipenv',
30   \ ale#Escape('pipenv') . ' run pymarkdown scan-stdin'
31
32 Execute(Setting executable to 'poetry' appends 'run pymarkdown'):
33   let g:ale_markdown_pymarkdown_executable = 'path/to/poetry'
34
35   AssertLinter 'path/to/poetry',
36   \ ale#Escape('path/to/poetry') . ' run pymarkdown scan-stdin'
37
38 Execute(Poetry is detected when markdown_pymarkdown_auto_poetry is set):
39   let g:ale_markdown_pymarkdown_auto_poetry = 1
40   call ale#test#SetFilename('../test-files/python/poetry/whatever.py')
41
42   AssertLinter 'poetry',
43   \ ale#Escape('poetry') . ' run pymarkdown scan-stdin'
44
45 Execute(uv is detected when markdown_pymarkdown_auto_uv is set):
46   let g:ale_markdown_pymarkdown_auto_uv = 1
47   call ale#test#SetFilename('../test-files/python/uv/whatever.py')
48
49   AssertLinter 'uv',
50   \ ale#Escape('uv') . ' run pymarkdown scan-stdin'