mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 15:38:33 +00:00
vim-patch:7.4.1397
Problem: Sort test fails on MS-Windows.
Solution: Correct the compare function.
0bb6108eb4
This commit is contained in:
@@ -296,7 +296,7 @@ static int included_patches[] = {
|
||||
// 1400 NA
|
||||
// 1399 NA
|
||||
// 1398 NA
|
||||
// 1397,
|
||||
1397,
|
||||
// 1396,
|
||||
// 1395 NA
|
||||
1394,
|
||||
|
@@ -31,11 +31,11 @@ describe('sort', function()
|
||||
it('ability to call sort() from a compare function', function()
|
||||
execute('func Compare1(a, b) abort')
|
||||
execute([[call sort(range(3), 'Compare2')]])
|
||||
execute('return a:a ># a:b')
|
||||
execute('return a:a - a:b')
|
||||
execute('endfunc')
|
||||
|
||||
execute('func Compare2(a, b) abort')
|
||||
execute('return a:a <# a:b')
|
||||
execute('return a:a - a:b')
|
||||
execute('endfunc')
|
||||
eq({1, 3, 5}, eval("sort([3, 1, 5], 'Compare1')"))
|
||||
end)
|
||||
|
Reference in New Issue
Block a user