diff options
author | w0rp <devw0rp@gmail.com> | 2017-05-31 13:14:39 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-05-31 13:14:39 +0100 |
commit | ab50b3a88a741ac86315ae3e716815c6725b159b (patch) | |
tree | 7bfed55d7e6537db505495a996133ec2f654b090 /test/test_loclist_corrections.vader | |
parent | 676a4049b35f7e4faa4ea55ee8a371a44cf1ab61 (diff) | |
download | ale-ab50b3a88a741ac86315ae3e716815c6725b159b.zip |
Fix #604 - Support highlights spanning many lines
Diffstat (limited to 'test/test_loclist_corrections.vader')
-rw-r--r-- | test/test_loclist_corrections.vader | 40 |
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 \ [ |