summaryrefslogtreecommitdiff
path: root/test/test_loclist_sorting.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_loclist_sorting.vader')
-rw-r--r--test/test_loclist_sorting.vader16
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')