diff options
author | w0rp <w0rp@users.noreply.github.com> | 2017-08-13 11:02:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-13 11:02:55 +0100 |
commit | b6f0b17eaf072de51423044e2e80dbfcc5c0a0da (patch) | |
tree | eea29efaa9fa719d9a322c5e5b1395830ec36617 /test/test_loclist_jumping.vader | |
parent | e6b614673144ed5d39a7a8d989b3904a45af1199 (diff) | |
parent | bc548b2ef90a9a12871bba1b16e19a55b28cc48d (diff) | |
download | ale-b6f0b17eaf072de51423044e2e80dbfcc5c0a0da.zip |
Merge pull request #848 from ilex/master
Fix bug with ALEPrevious for blank lines.
Diffstat (limited to 'test/test_loclist_jumping.vader')
-rw-r--r-- | test/test_loclist_jumping.vader | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_loclist_jumping.vader b/test/test_loclist_jumping.vader index 793190d1..da167677 100644 --- a/test/test_loclist_jumping.vader +++ b/test/test_loclist_jumping.vader @@ -32,6 +32,7 @@ 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]) @@ -74,3 +75,12 @@ Execute(We shouldn't move when jumping to the first item where there are none): let g:ale_buffer_info[bufnr('%')].loclist = [] AssertEqual [1, 6], TestJump(0, 0, [1, 6]) + +Execute(We should be able to jump when the error line is blank): + call add(g:ale_buffer_info[bufnr('%')].loclist, {'bufnr': bufnr(''), 'lnum': 3, 'col': 1}) + + AssertEqual 0, len(getline(3)) + AssertEqual [2, 8], TestJump('before', 0, [3, 1]) + AssertEqual [2, 8], TestJump('before', 1, [3, 1]) + AssertEqual [3, 1], TestJump('after', 0, [3, 1]) + AssertEqual [1, 2], TestJump('after', 1, [3, 1]) |