]> granicus.if.org Git - vim/commitdiff
patch 7.4.1071 v7.4.1071
authorBram Moolenaar <Bram@vim.org>
Sat, 9 Jan 2016 19:23:00 +0000 (20:23 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 9 Jan 2016 19:23:00 +0000 (20:23 +0100)
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.

src/testdir/runtest.vim
src/testdir/test_quickfix.vim
src/version.c

index 1c4ceadb4c2f8f0f4035ca6f106020cf42264224..734039aca1eae68aa9c71238ed94aaba3dd9b1fc 100644 (file)
@@ -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
index 6910a8b294a91bfcdef8b6b7282238d0d1f38703..fb05b7d780fb89e1c475c887c9d2edce8687f93a 100644 (file)
@@ -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
 
index af26ae3706a9a81c56a7cc3730f330ca121c4bf1..b1269e19a0f030fd44f551cd8ecd1b050a7752e6 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1071,
 /**/
     1070,
 /**/