diff options
author | w0rp <devw0rp@gmail.com> | 2018-04-10 21:05:22 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-04-10 21:05:22 +0100 |
commit | f064ba48f5893f25c1af9459b309a919a392db7c (patch) | |
tree | 00b33c7c7f86ae201ca5908b2a7e9f71c3588ac2 /test/test_loclist_sorting.vader | |
parent | 3f0e1cd05dc526b073946ad96c64f6a5e2f9e4e6 (diff) | |
download | ale-f064ba48f5893f25c1af9459b309a919a392db7c.zip |
Close #1494 - Prefer displaying higher severity problems for cursor messages, balloons, and highlights
Diffstat (limited to 'test/test_loclist_sorting.vader')
-rw-r--r-- | test/test_loclist_sorting.vader | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_loclist_sorting.vader b/test/test_loclist_sorting.vader index 157b2a25..376e743a 100644 --- a/test/test_loclist_sorting.vader +++ b/test/test_loclist_sorting.vader @@ -25,3 +25,19 @@ Execute(loclist item should be sorted): \ {'bufnr': 2, 'lnum': 1, 'col': 2}, \ {'bufnr': -1, 'filename': 'c', 'lnum': 3, 'col': 2}, \], 'ale#util#LocItemCompare') + +Execute(Items should be sorted in by their problem priority when they lie on the same column): + AssertEqual [ + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'W', 'sub_type': 'style'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'E', 'sub_type': 'style'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'I'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'W'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'E'}, + \ ], + \ sort([ + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'E'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'I'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'W'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'E', 'sub_type': 'style'}, + \ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'W', 'sub_type': 'style'}, + \], 'ale#util#LocItemCompare') |