summaryrefslogtreecommitdiff
path: root/test/test_loclist_jumping.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-08-13 13:02:59 +0100
committerw0rp <devw0rp@gmail.com>2017-08-13 13:02:59 +0100
commitc6d11f4281e3c3090b2633e234acf437e168d415 (patch)
tree2a7f96853e68326b49e02b56f20cf0dd1675d31f /test/test_loclist_jumping.vader
parentb6f0b17eaf072de51423044e2e80dbfcc5c0a0da (diff)
downloadale-c6d11f4281e3c3090b2633e234acf437e168d415.zip
#653 - Filter out other buffers for loclist jumping
Diffstat (limited to 'test/test_loclist_jumping.vader')
-rw-r--r--test/test_loclist_jumping.vader8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/test_loclist_jumping.vader b/test/test_loclist_jumping.vader
index da167677..5e18499e 100644
--- a/test/test_loclist_jumping.vader
+++ b/test/test_loclist_jumping.vader
@@ -1,7 +1,8 @@
Before:
let g:ale_buffer_info = {
- \ bufnr('%'): {
+ \ bufnr(''): {
\ 'loclist': [
+ \ {'bufnr': bufnr('') - 1, 'lnum': 3, 'col': 2},
\ {'bufnr': bufnr(''), 'lnum': 1, 'col': 2},
\ {'bufnr': bufnr(''), 'lnum': 1, 'col': 3},
\ {'bufnr': bufnr(''), 'lnum': 2, 'col': 1},
@@ -9,6 +10,7 @@ Before:
\ {'bufnr': bufnr(''), 'lnum': 2, 'col': 3},
\ {'bufnr': bufnr(''), 'lnum': 2, 'col': 6},
\ {'bufnr': bufnr(''), 'lnum': 2, 'col': 700},
+ \ {'bufnr': bufnr('') + 1, 'lnum': 3, 'col': 2},
\ ],
\ },
\}
@@ -32,7 +34,6 @@ After:
Given foobar (Some imaginary filetype):
12345678
12345678
-
Execute(loclist jumping should jump correctly when not wrapping):
AssertEqual [2, 1], TestJump('before', 0, [2, 2])
@@ -77,6 +78,9 @@ Execute(We shouldn't move when jumping to the first item where there are none):
AssertEqual [1, 6], TestJump(0, 0, [1, 6])
Execute(We should be able to jump when the error line is blank):
+ " Add a blank line at the end.
+ call setline(1, getline('.', '$') + [''])
+ " Add a problem on the blank line.
call add(g:ale_buffer_info[bufnr('%')].loclist, {'bufnr': bufnr(''), 'lnum': 3, 'col': 1})
AssertEqual 0, len(getline(3))