You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dot-files/test/test_loclist_sorting.vader

28 lines
1.1 KiB
Plaintext

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')