diff options
author | w0rp <devw0rp@gmail.com> | 2017-08-12 14:37:56 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-08-12 14:37:56 +0100 |
commit | c14886e479988bb3d97bf19a344864e46b605ed1 (patch) | |
tree | 073b1879652ad91475e16efbe91a259202ac5e96 /test | |
parent | c52a4910bf281f5e7851db455adf8939412308c1 (diff) | |
download | ale-c14886e479988bb3d97bf19a344864e46b605ed1.zip |
#653 - Include the buffer number in sorting of items
Diffstat (limited to 'test')
-rw-r--r-- | test/test_loclist_sorting.vader | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/test/test_loclist_sorting.vader b/test/test_loclist_sorting.vader index 6e52be6f..c095bdda 100644 --- a/test/test_loclist_sorting.vader +++ b/test/test_loclist_sorting.vader @@ -1,9 +1,14 @@ Before: let g:loclist = [ - \ {'lnum': 5, 'col': 5}, - \ {'lnum': 5, 'col': 4}, - \ {'lnum': 2, 'col': 10}, - \ {'lnum': 3, 'col': 2}, + \ {'bufnr': 3, 'lnum': 1, 'col': 1}, + \ {'bufnr': 1, 'lnum': 5, 'col': 5}, + \ {'bufnr': 2, 'lnum': 5, 'col': 5}, + \ {'bufnr': 1, 'lnum': 5, 'col': 4}, + \ {'bufnr': 1, 'lnum': 2, 'col': 10}, + \ {'bufnr': 2, 'lnum': 1, 'col': 5}, + \ {'bufnr': 1, 'lnum': 3, 'col': 2}, + \ {'bufnr': 2, 'lnum': 1, 'col': 2}, + \ {'bufnr': -1, 'lnum': 3, 'col': 2}, \] Execute (Sort loclist with comparison function): @@ -11,10 +16,15 @@ Execute (Sort loclist with comparison function): Then (loclist item should be sorted): AssertEqual [ - \ {'lnum': 2, 'col': 10}, - \ {'lnum': 3, 'col': 2}, - \ {'lnum': 5, 'col': 4}, - \ {'lnum': 5, 'col': 5}, + \ {'bufnr': -1, 'lnum': 3, 'col': 2}, + \ {'bufnr': 1, 'lnum': 2, 'col': 10}, + \ {'bufnr': 1, 'lnum': 3, 'col': 2}, + \ {'bufnr': 1, 'lnum': 5, 'col': 4}, + \ {'bufnr': 1, 'lnum': 5, 'col': 5}, + \ {'bufnr': 2, 'lnum': 1, 'col': 2}, + \ {'bufnr': 2, 'lnum': 1, 'col': 5}, + \ {'bufnr': 2, 'lnum': 5, 'col': 5}, + \ {'bufnr': 3, 'lnum': 1, 'col': 1}, \], g:loclist After: |