mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 07:28:34 +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
|
// 1400 NA
|
||||||
// 1399 NA
|
// 1399 NA
|
||||||
// 1398 NA
|
// 1398 NA
|
||||||
// 1397,
|
1397,
|
||||||
// 1396,
|
// 1396,
|
||||||
// 1395 NA
|
// 1395 NA
|
||||||
1394,
|
1394,
|
||||||
|
@@ -31,11 +31,11 @@ describe('sort', function()
|
|||||||
it('ability to call sort() from a compare function', function()
|
it('ability to call sort() from a compare function', function()
|
||||||
execute('func Compare1(a, b) abort')
|
execute('func Compare1(a, b) abort')
|
||||||
execute([[call sort(range(3), 'Compare2')]])
|
execute([[call sort(range(3), 'Compare2')]])
|
||||||
execute('return a:a ># a:b')
|
execute('return a:a - a:b')
|
||||||
execute('endfunc')
|
execute('endfunc')
|
||||||
|
|
||||||
execute('func Compare2(a, b) abort')
|
execute('func Compare2(a, b) abort')
|
||||||
execute('return a:a <# a:b')
|
execute('return a:a - a:b')
|
||||||
execute('endfunc')
|
execute('endfunc')
|
||||||
eq({1, 3, 5}, eval("sort([3, 1, 5], 'Compare1')"))
|
eq({1, 3, 5}, eval("sort([3, 1, 5], 'Compare1')"))
|
||||||
end)
|
end)
|
||||||
|
Reference in New Issue
Block a user