diff options
Diffstat (limited to 'test/functional/viml/errorlist_spec.lua')
-rw-r--r-- | test/functional/viml/errorlist_spec.lua | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/test/functional/viml/errorlist_spec.lua b/test/functional/viml/errorlist_spec.lua index f889ca9adc..6c5a63e6b1 100644 --- a/test/functional/viml/errorlist_spec.lua +++ b/test/functional/viml/errorlist_spec.lua @@ -27,20 +27,18 @@ describe('setqflist()', function() setqflist({''}, 'r', 'foo') command('copen') eq(':foo', get_cur_win_var('quickfix_title')) + setqflist({''}, 'r', {['title'] = 'qf_title'}) + eq('qf_title', get_cur_win_var('quickfix_title')) end) - it('requires string or number for {title}', function() - command('copen') + it('allows string {what} for backwards compatibility', function() setqflist({}, 'r', '5') + command('copen') eq(':5', get_cur_win_var('quickfix_title')) - setqflist({}, 'r', 6) - eq(':6', get_cur_win_var('quickfix_title')) - local exc = exc_exec('call setqflist([], "r", function("function"))') - eq('Vim(call):E729: using Funcref as a String', exc) - exc = exc_exec('call setqflist([], "r", [])') - eq('Vim(call):E730: using List as a String', exc) - exc = exc_exec('call setqflist([], "r", {})') - eq('Vim(call):E731: using Dictionary as a String', exc) + end) + + it('requires a dict for {what}', function() + eq('Vim(call):E715: Dictionary required', exc_exec('call setqflist([], "r", function("function"))')) end) end) |