Skip to content

Commit cfc0a35

Browse files
committed
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.
1 parent 8a5115c commit cfc0a35

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

src/testdir/runtest.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ function /^Test_
6868
redir END
6969
let tests = split(substitute(@q, 'function \(\k*()\)', '\1', 'g'))
7070

71-
for test in tests
71+
" Execute the tests in alphabetical order.
72+
for test in sort(tests)
7273
if exists("*SetUp")
7374
call SetUp()
7475
endif

src/testdir/test_quickfix.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ endfunction
7272

7373
" Tests for the :colder, :cnewer, :lolder and :lnewer commands
7474
" Note that this test assumes that a quickfix/location list is
75-
" already set by previous tests
75+
" already set by the caller.
7676
function XageTests(cchar)
7777
let Xolder = a:cchar . 'older'
7878
let Xnewer = a:cchar . 'newer'
@@ -116,7 +116,11 @@ function XageTests(cchar)
116116
endfunction
117117

118118
function Test_cage()
119+
let list = [{'bufnr': 1, 'lnum': 1}]
120+
call setqflist(list)
119121
call XageTests('c')
122+
123+
call setloclist(0, list)
120124
call XageTests('l')
121125
endfunction
122126

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
1071,
744746
/**/
745747
1070,
746748
/**/

0 commit comments

Comments
 (0)