]> git.madduck.net Git - etc/vim.git/blob - test/handler/test_cfn_python_lint_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 / handler / test_cfn_python_lint_handler.vader
1 Before:
2   runtime! ale_linters/cloudformation/cfn_python_lint.vim
3   call ale#test#SetFilename('sample.template.yaml')
4
5 After:
6   call ale#linter#Reset()
7
8 Execute(The cfn_python_lint handler should parse items correctly):
9   AssertEqual
10   \ [
11   \   {
12   \     'lnum': '96',
13   \     'col': '7',
14   \     'end_lnum': '96',
15   \     'end_col': '15',
16   \     'text': 'Property Resources/Sample/Properties/FromPort should be of type Integer',
17   \     'code': 'E3012',
18   \     'type': 'E',
19   \   },
20   \   {
21   \     'lnum': '97',
22   \     'col': '7',
23   \     'end_lnum': '97',
24   \     'end_col': '15',
25   \     'text': 'AllowedPattern and/or AllowedValues for Parameter should be specified at Parameters/SampleIpAddress. Example for AllowedPattern "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$"',
26   \     'code': 'W2509',
27   \     'type': 'W',
28   \   },
29   \ ],
30   \ ale_linters#cloudformation#cfn_python_lint#Handle(bufnr(''), [
31   \ fnamemodify(tempname(), ':h') . '/sample.template.yaml:96:7:96:15:E3012:Property Resources/Sample/Properties/FromPort should be of type Integer',
32   \ fnamemodify(tempname(), ':h') . '/sample.template.yaml:97:7:97:15:W2509:AllowedPattern and/or AllowedValues for Parameter should be specified at Parameters/SampleIpAddress. Example for AllowedPattern "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$"',
33   \ ])