aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/quickfix_spec.lua
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-05-24 19:53:50 -0400
committerJames McCoy <jamessan@jamessan.com>2016-05-24 20:49:19 -0400
commit4a40231317c118cd4b63fb7c5f1922d6dbf78419 (patch)
treeb900eb6691d5da71722973783726060a8ed42d03 /test/functional/legacy/quickfix_spec.lua
parentda9b6b1de0120a86501293242073fbebe78395b7 (diff)
downloadrneovim-4a40231317c118cd4b63fb7c5f1922d6dbf78419.tar.gz
rneovim-4a40231317c118cd4b63fb7c5f1922d6dbf78419.tar.bz2
rneovim-4a40231317c118cd4b63fb7c5f1922d6dbf78419.zip
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. https://github.com/vim/vim/commit/cfc0a350a9fa04f1b0cfa1ba31fbd2847376513f
Diffstat (limited to 'test/functional/legacy/quickfix_spec.lua')
-rw-r--r--test/functional/legacy/quickfix_spec.lua13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/functional/legacy/quickfix_spec.lua b/test/functional/legacy/quickfix_spec.lua
index 4e594062be..315b8ca682 100644
--- a/test/functional/legacy/quickfix_spec.lua
+++ b/test/functional/legacy/quickfix_spec.lua
@@ -76,7 +76,7 @@ describe('helpgrep', function()
" 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'
@@ -268,15 +268,20 @@ describe('helpgrep', function()
]])
end)
- it('[cl]list/[cl]older/[cl]newer work', function()
+ it('clist/llist work', function()
call('XlistTests', 'c')
expected_empty()
call('XlistTests', 'l')
expected_empty()
- -- The XageTests require existing quickfix lists, so bundle
- -- them with the XlistTests
+ end)
+
+ it('colder/cnewer and lolder/lnewer work', function()
+ local list = {{bufnr = 1, lnum = 1}}
+ call('setqflist', list)
call('XageTests', 'c')
expected_empty()
+
+ call('setloclist', 0, list)
call('XageTests', 'l')
expected_empty()
end)