]> git.madduck.net Git - etc/vim.git/blob - test/test_getmatches.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 / test_getmatches.vader
1 Execute (ale#util#GetMatches should return matches for many lines):
2   AssertEqual
3   \ [
4   \   [
5   \     '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]',
6   \     '47',
7   \     '14',
8   \     'Missing trailing comma.',
9   \     'Warning/comma-dangle',
10   \     '',
11   \     '',
12   \     '',
13   \     '',
14   \     '',
15   \   ],
16   \   [
17   \     '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]',
18   \     '56',
19   \     '41',
20   \     'Missing semicolon.',
21   \     'Error/semi',
22   \     '',
23   \     '',
24   \     '',
25   \     '',
26   \     '',
27   \   ],
28   \ ],
29   \ ale#util#GetMatches(
30   \   [
31   \     '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]',
32   \     '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]',
33   \   ],
34   \   [
35   \     '^.*:\(\d\+\):\(\d\+\): \(.\+\) \[\(.\+\)\]$',
36   \   ]
37   \ )
38
39 Execute (ale#util#GetMatches should accept a string for a single pattern):
40   AssertEqual
41   \ [
42   \   [
43   \     '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]',
44   \     '47',
45   \     '14',
46   \     'Missing trailing comma.',
47   \     'Warning/comma-dangle',
48   \     '',
49   \     '',
50   \     '',
51   \     '',
52   \     '',
53   \   ],
54   \   [
55   \     '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]',
56   \     '56',
57   \     '41',
58   \     'Missing semicolon.',
59   \     'Error/semi',
60   \     '',
61   \     '',
62   \     '',
63   \     '',
64   \     '',
65   \   ],
66   \ ],
67   \ ale#util#GetMatches(
68   \   [
69   \     '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]',
70   \     '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]',
71   \   ],
72   \   '^.*:\(\d\+\):\(\d\+\): \(.\+\) \[\(.\+\)\]$'
73   \ )
74
75 Execute (ale#util#MapMatches should map matches):
76   AssertEqual
77   \ [
78   \   '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]',
79   \   '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]',
80   \ ],
81   \ ale#util#MapMatches(
82   \   [
83   \     '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]',
84   \     '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]',
85   \   ],
86   \   '^.*:\(\d\+\):\(\d\+\): \(.\+\) \[\(.\+\)\]$',
87   \   {match -> match[0]}
88   \ )
89
90 Execute (ale#util#GetMatches should accept a single line as a string):
91   AssertEqual
92   \ [
93   \   [
94   \     '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]',
95   \     '47',
96   \     '14',
97   \     'Missing trailing comma.',
98   \     'Warning/comma-dangle',
99   \     '',
100   \     '',
101   \     '',
102   \     '',
103   \     '',
104   \   ],
105   \ ],
106   \ ale#util#GetMatches(
107   \   '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]',
108   \   [
109   \     '^.*:\(\d\+\):\(\d\+\): \(.\+\) \[\(.\+\)\]$',
110   \   ]
111   \ )
112
113 Execute (ale#util#GetMatches should match multiple patterns correctly):
114   AssertEqual
115   \ [
116   \   [
117   \     '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]',
118   \     '47',
119   \     '14',
120   \     'Missing trailing comma.',
121   \     'Warning/comma-dangle',
122   \     '',
123   \     '',
124   \     '',
125   \     '',
126   \     '',
127   \   ],
128   \   [
129   \     '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]',
130   \     '56',
131   \     '41',
132   \     'Missing semicolon.',
133   \     'Error/semi',
134   \     '',
135   \     '',
136   \     '',
137   \     '',
138   \     '',
139   \   ],
140   \   [
141   \     '/path/to/some-filename.js:13:3: Parsing error: Unexpected token',
142   \     '13',
143   \     '3',
144   \     'Parsing error: Unexpected token',
145   \     '',
146   \     '',
147   \     '',
148   \     '',
149   \     '',
150   \     '',
151   \   ],
152   \ ],
153   \ ale#util#GetMatches(
154   \   [
155   \     '/path/to/some-filename.js:47:14: Missing trailing comma. [Warning/comma-dangle]',
156   \     '/path/to/some-filename.js:56:41: Missing semicolon. [Error/semi]',
157   \     '/path/to/some-filename.js:13:3: Parsing error: Unexpected token',
158   \   ],
159   \   [
160   \     '^.*:\(\d\+\):\(\d\+\): \(.\+\) \[\(.\+\)\]$',
161   \     '^.*:\(\d\+\):\(\d\+\): \(.\+\)$',
162   \   ]
163   \ )