vim-patch:7.4.1768

Problem:    Arguments of setqflist() are not checked properly.
Solution:   Add better checks, add a test. (Nikolai Pavlov, Hirohito Higashi,
            closes vim/vim#661)

d106e5ba7f
This commit is contained in:
James McCoy
2016-12-12 11:33:51 -05:00
parent e89efe75f9
commit 29d7a59711
5 changed files with 111 additions and 20 deletions

View File

@@ -18,9 +18,9 @@ describe('setqflist()', function()
end)
it('requires a string for {action}', function()
eq('Vim(call):E114: String required', exc_exec('call setqflist([], 5)'))
eq('Vim(call):E114: String required', exc_exec('call setqflist([], [])'))
eq('Vim(call):E114: String required', exc_exec('call setqflist([], {})'))
eq('Vim(call):E928: String required', exc_exec('call setqflist([], 5)'))
eq('Vim(call):E928: String required', exc_exec('call setqflist([], [])'))
eq('Vim(call):E928: String required', exc_exec('call setqflist([], {})'))
end)
it('sets w:quickfix_title', function()
@@ -56,9 +56,9 @@ describe('setloclist()', function()
end)
it('requires a string for {action}', function()
eq('Vim(call):E114: String required', exc_exec('call setloclist(0, [], 5)'))
eq('Vim(call):E114: String required', exc_exec('call setloclist(0, [], [])'))
eq('Vim(call):E114: String required', exc_exec('call setloclist(0, [], {})'))
eq('Vim(call):E928: String required', exc_exec('call setloclist(0, [], 5)'))
eq('Vim(call):E928: String required', exc_exec('call setloclist(0, [], [])'))
eq('Vim(call):E928: String required', exc_exec('call setloclist(0, [], {})'))
end)
it('sets w:quickfix_title for the correct window', function()