Mercurial > vim
changeset 7540:b910bb01832a v7.4.1071
commit https://github.com/vim/vim/commit/cfc0a350a9fa04f1b0cfa1ba31fbd2847376513f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 9 20:23:00 2016 +0100
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 09 Jan 2016 20:30:04 +0100 |
parents | f5d3b2c6f971 |
children | e851cbcf7a73 |
files | src/testdir/runtest.vim src/testdir/test_quickfix.vim src/version.c |
diffstat | 3 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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