summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-09 20:23:00 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-09 20:23:00 +0100
commitcfc0a350a9fa04f1b0cfa1ba31fbd2847376513f (patch)
tree20b6fe161cb570f388871413922333f33027739c
parent8a5115cf18751022387af2085f374d38c60dde83 (diff)
patch 7.4.1071v7.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.
-rw-r--r--src/testdir/runtest.vim3
-rw-r--r--src/testdir/test_quickfix.vim6
-rw-r--r--src/version.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index 1c4ceadb4c..734039aca1 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -68,7 +68,8 @@ function /^Test_
redir END
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")
call SetUp()
endif
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim
index 6910a8b294..fb05b7d780 100644
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -72,7 +72,7 @@ endfunction
" Tests for the :colder, :cnewer, :lolder and :lnewer commands
" Note that this test assumes that a quickfix/location list is
-" already set by previous tests
+" already set by the caller.
function XageTests(cchar)
let Xolder = a:cchar . 'older'
let Xnewer = a:cchar . 'newer'
@@ -116,7 +116,11 @@ function XageTests(cchar)
endfunction
function Test_cage()
+ let list = [{'bufnr': 1, 'lnum': 1}]
+ call setqflist(list)
call XageTests('c')
+
+ call setloclist(0, list)
call XageTests('l')
endfunction
diff --git a/src/version.c b/src/version.c
index af26ae3706..b1269e19a0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1071,
+/**/
1070,
/**/
1069,