]> git.madduck.net Git - etc/vim.git/blob - test/handler/test_thrift_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_thrift_handler.vader
1 Before:
2   runtime ale_linters/thrift/thrift.vim
3
4 After:
5   call ale#linter#Reset()
6
7 Execute(The thrift handler should handle basic warnings and errors):
8   AssertEqual
9   \ [
10   \   {
11   \     'lnum': 17,
12   \     'col': 0,
13   \     'type': 'W',
14   \     'text': 'The "byte" type is a compatibility alias for "i8". Use i8" to emphasize the signedness of this type.',
15   \   },
16   \   {
17   \     'lnum': 20,
18   \     'col': 0,
19   \     'type': 'W',
20   \     'text': 'Could not find include file include.thrift',
21   \   },
22   \   {
23   \     'lnum': 83,
24   \     'col': 0,
25   \     'type': 'E',
26   \     'text': 'Enum FOO is already defined!',
27   \   },
28   \ ],
29   \ ale_linters#thrift#thrift#Handle(1, [
30   \   '[WARNING:/path/filename.thrift:17] The "byte" type is a compatibility alias for "i8". Use i8" to emphasize the signedness of this type.',
31   \   '[WARNING:/path/filename.thrift:20] Could not find include file include.thrift',
32   \   '[FAILURE:/path/filename.thrift:83] Enum FOO is already defined!',
33   \ ])
34
35 Execute(The thrift handler should handle multiline errors):
36   AssertEqual
37   \ [
38   \   {
39   \     'lnum': 75,
40   \     'col': 0,
41   \     'type': 'E',
42   \     'text': 'This integer is too big: "11111111114213213453243"',
43   \   },
44   \   {
45   \     'lnum': 76,
46   \     'col': 0,
47   \     'type': 'E',
48   \     'text': 'Implicit field keys are deprecated and not allowed with -strict',
49   \   },
50   \   {
51   \     'lnum': 77,
52   \     'col': 0,
53   \     'type': 'E',
54   \     'text': "Unknown error (last token was ';')",
55   \   },
56   \ ],
57   \ ale_linters#thrift#thrift#Handle(1, [
58   \   "[ERROR:/path/filename.thrift:75] (last token was '11111111114213213453243')",
59   \   'This integer is too big: "11111111114213213453243"',
60   \   "[ERROR:/path/filename.thrift:76] (last token was ';')",
61   \   'Implicit field keys are deprecated and not allowed with -strict',
62   \   "[ERROR:/path/filename.thrift:77] (last token was ';')",
63   \ ])