]> git.madduck.net Git - etc/vim.git/blob - test/linter/test_pymarkdown_handler.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_handler.vader
1 Before:
2     Save g:ale_warn_about_trailing_whitespace
3
4     let g:ale_warn_about_trailing_whitespace = 1
5
6     runtime ale_linters/markdown/pymarkdown.vim
7
8 After:
9     Restore
10     unlet! b:ale_warn_about_trailing_whitespace
11
12     call ale#linter#Reset()
13
14 Execute (Should parse error correctly):
15   AssertEqual
16   \ [
17   \   {
18         \   'lnum': 1,
19         \   'col': 1,
20         \   'type': 'M',
21         \   'text': 'Headings should be surrounded by blank lines',
22         \   'code': 'MD022',
23   \   }
24   \ ],
25   \ ale_linters#markdown#pymarkdown#Handle(bufnr(''), [
26   \ 'foo.md:1:1: MD022: Headings should be surrounded by blank lines',
27   \ ])
28
29 Execute(Warnings about trailing whitespace should be reported by default):
30   AssertEqual
31   \ [
32   \   {
33         \   'lnum': 1,
34         \   'col': 1,
35         \   'type': 'M',
36         \   'text': 'who cares',
37         \   'code': 'MD009',
38   \   },
39   \ ],
40   \ ale_linters#markdown#pymarkdown#Handle(bufnr(''), [
41   \   'foo.md:1:1: MD009: who cares',
42   \ ])
43
44 Execute(Disabling trailing whitespace warnings should work):
45   let b:ale_warn_about_trailing_whitespace = 0
46
47   AssertEqual
48   \ [
49   \ ],
50   \ ale_linters#markdown#pymarkdown#Handle(bufnr(''), [
51   \   'foo.md:1:1: MD009: who cares',
52   \ ])