mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.1397
Problem: Sort test fails on MS-Windows.
Solution: Correct the compare function.
0bb6108eb4
This commit is contained in:
@@ -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