From 29aa08a09da088178bccc5ea29ac1c872bc4ab32 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 29 Mar 2022 22:14:37 +0200 Subject: vim-patch:8.2.3449: sort fails if the sort compare function returns 999 (#17909) Problem: Sort fails if the sort compare function returns 999. Solution: Adjust value to -1 / 0 / 1. (Yasuhiro Matsumoto, closes vim/vim#8884) https://github.com/vim/vim/commit/c04f62346bfd6b92151908239a3c5ab1a7d18f2a --- src/nvim/testdir/test_sort.vim | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_sort.vim b/src/nvim/testdir/test_sort.vim index f72368fc59..5d7dd7bfff 100644 --- a/src/nvim/testdir/test_sort.vim +++ b/src/nvim/testdir/test_sort.vim @@ -59,6 +59,7 @@ endfunc func Test_sort_numbers() call assert_equal([3, 13, 28], sort([13, 28, 3], 'N')) call assert_equal(['3', '13', '28'], sort(['13', '28', '3'], 'N')) + call assert_equal([3997, 4996], sort([4996, 3997], 'Compare1')) endfunc func Test_sort_float() -- cgit