This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/test_loclist_sorting.vader

27 lines
1.1 KiB
Text

Execute(loclist item should be sorted):
AssertEqual [
\ {'bufnr': -1, 'filename': 'b', 'lnum': 4, 'col': 2},
\ {'bufnr': -1, 'filename': 'b', 'lnum': 5, 'col': 2},
\ {'bufnr': -1, 'filename': 'c', '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},
\ ],
\ sort([
\ {'bufnr': 3, 'lnum': 1, 'col': 1},
\ {'bufnr': -1, 'filename': 'b', 'lnum': 5, 'col': 2},
\ {'bufnr': 1, 'lnum': 5, 'col': 5},
\ {'bufnr': 2, 'lnum': 5, 'col': 5},
\ {'bufnr': -1, 'filename': 'b', 'lnum': 4, 'col': 2},
\ {'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, 'filename': 'c', 'lnum': 3, 'col': 2},
\], 'ale#util#LocItemCompare')