forked from aniani/vim
patch 8.2.3449: sort fails if the sort compare function returns 999
Problem: Sort fails if the sort compare function returns 999. Solution: Adjust value to -1 / 0 / 1. (Yasuhiro Matsumoto, closes #8884)
This commit is contained in:
committed by
Bram Moolenaar
parent
1d34189ecb
commit
c04f62346b
@@ -58,6 +58,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()
|
||||
|
||||
Reference in New Issue
Block a user