summaryrefslogtreecommitdiff
path: root/test/test_loclist_corrections.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_loclist_corrections.vader')
-rw-r--r--test/test_loclist_corrections.vader40
1 files changed, 39 insertions, 1 deletions
diff --git a/test/test_loclist_corrections.vader b/test/test_loclist_corrections.vader
index f424424d..4e3f543c 100644
--- a/test/test_loclist_corrections.vader
+++ b/test/test_loclist_corrections.vader
@@ -129,7 +129,7 @@ Execute(FixLocList should convert line and column numbers correctly):
\ [{'text': 'a', 'lnum': '010', 'col': '010'}],
\ )
-Execute(FixLocList should pass on col_length values):
+Execute(FixLocList should pass on end_col values):
" The numbers should be 10, not 8 as octals.
AssertEqual
\ [
@@ -165,6 +165,44 @@ Execute(FixLocList should pass on col_length values):
\ ],
\ )
+Execute(FixLocList should pass on end_lnum values):
+ AssertEqual
+ \ [
+ \ {
+ \ 'text': 'a',
+ \ 'lnum': 10,
+ \ 'col': 10,
+ \ 'end_lnum': 13,
+ \ 'end_col': 12,
+ \ 'bufnr': bufnr('%'),
+ \ 'vcol': 0,
+ \ 'type': 'E',
+ \ 'nr': -1,
+ \ 'linter_name': 'foobar',
+ \ },
+ \ {
+ \ 'text': 'a',
+ \ 'lnum': 10,
+ \ 'col': 11,
+ \ 'end_lnum': 13,
+ \ 'end_col': 12,
+ \ 'bufnr': bufnr('%'),
+ \ 'vcol': 0,
+ \ 'type': 'E',
+ \ 'nr': -1,
+ \ 'linter_name': 'foobar',
+ \ },
+ \],
+ \ ale#engine#FixLocList(
+ \ bufnr('%'),
+ \ {'name': 'foobar'},
+ \ [
+ \ {'text': 'a', 'lnum': '010', 'col': '010', 'end_col': '012', 'end_lnum': '013'},
+ \ {'text': 'a', 'lnum': '010', 'col': '011', 'end_col': 12, 'end_lnum': 13},
+ \ ],
+ \ )
+
+
Execute(FixLocList should allow subtypes to be set):
AssertEqual
\ [