mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 07:58:35 +00:00
vim-patch:7.4.1071
Problem: New style tests are executed in arbitrary order.
Solution: Sort the test function names. (Hirohito Higashi)
Fix the quickfix test that depended on the order.
cfc0a350a9
This commit is contained in:
@@ -65,7 +65,8 @@ function /^Test_
|
|||||||
redir END
|
redir END
|
||||||
let tests = split(substitute(@q, 'function \(\k*()\)', '\1', 'g'))
|
let tests = split(substitute(@q, 'function \(\k*()\)', '\1', 'g'))
|
||||||
|
|
||||||
for test in tests
|
" Execute the tests in alphabetical order.
|
||||||
|
for test in sort(tests)
|
||||||
if exists("*SetUp")
|
if exists("*SetUp")
|
||||||
call SetUp()
|
call SetUp()
|
||||||
endif
|
endif
|
||||||
|
@@ -613,7 +613,7 @@ static int included_patches[] = {
|
|||||||
// 1074 NA,
|
// 1074 NA,
|
||||||
// 1073,
|
// 1073,
|
||||||
1072,
|
1072,
|
||||||
// 1071,
|
1071,
|
||||||
// 1070 NA
|
// 1070 NA
|
||||||
// 1069 NA
|
// 1069 NA
|
||||||
// 1068,
|
// 1068,
|
||||||
|
@@ -76,7 +76,7 @@ describe('helpgrep', function()
|
|||||||
|
|
||||||
" Tests for the :colder, :cnewer, :lolder and :lnewer commands
|
" Tests for the :colder, :cnewer, :lolder and :lnewer commands
|
||||||
" Note that this test assumes that a quickfix/location list is
|
" Note that this test assumes that a quickfix/location list is
|
||||||
" already set by previous tests
|
" already set by the caller
|
||||||
function XageTests(cchar)
|
function XageTests(cchar)
|
||||||
let Xolder = a:cchar . 'older'
|
let Xolder = a:cchar . 'older'
|
||||||
let Xnewer = a:cchar . 'newer'
|
let Xnewer = a:cchar . 'newer'
|
||||||
@@ -268,15 +268,20 @@ describe('helpgrep', function()
|
|||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('[cl]list/[cl]older/[cl]newer work', function()
|
it('clist/llist work', function()
|
||||||
call('XlistTests', 'c')
|
call('XlistTests', 'c')
|
||||||
expected_empty()
|
expected_empty()
|
||||||
call('XlistTests', 'l')
|
call('XlistTests', 'l')
|
||||||
expected_empty()
|
expected_empty()
|
||||||
-- The XageTests require existing quickfix lists, so bundle
|
end)
|
||||||
-- them with the XlistTests
|
|
||||||
|
it('colder/cnewer and lolder/lnewer work', function()
|
||||||
|
local list = {{bufnr = 1, lnum = 1}}
|
||||||
|
call('setqflist', list)
|
||||||
call('XageTests', 'c')
|
call('XageTests', 'c')
|
||||||
expected_empty()
|
expected_empty()
|
||||||
|
|
||||||
|
call('setloclist', 0, list)
|
||||||
call('XageTests', 'l')
|
call('XageTests', 'l')
|
||||||
expected_empty()
|
expected_empty()
|
||||||
end)
|
end)
|
||||||
|
Reference in New Issue
Block a user