vim-patch:7.4.1397

Problem:    Sort test fails on MS-Windows.
Solution:   Correct the compare function.

0bb6108eb4
This commit is contained in:
Jurica Bradaric
2016-05-14 22:35:51 +02:00
parent 81b9b37e01
commit 82da7eed34
2 changed files with 3 additions and 3 deletions

View File

@@ -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,

View File

@@ -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)