vim-patch:8.2.2646: Vim9: error for not using string doesn't mention argument

Problem:    Vim9: error for not using string doesn't mention argument.
Solution:   Add argument number.
f28f2ac425
This commit is contained in:
zeertzjq
2022-09-12 14:03:32 +08:00
parent f98cff9575
commit 38059b4f31
5 changed files with 30 additions and 15 deletions

View File

@@ -34,11 +34,13 @@ describe('executable()', function()
it('fails for invalid values', function()
for _, input in ipairs({'v:null', 'v:true', 'v:false', '{}', '[]'}) do
eq('Vim(call):E928: String required', exc_exec('call executable('..input..')'))
eq('Vim(call):E1174: String required for argument 1',
exc_exec('call executable('..input..')'))
end
command('let $PATH = fnamemodify("./test/functional/fixtures/bin", ":p")')
for _, input in ipairs({'v:null', 'v:true', 'v:false'}) do
eq('Vim(call):E928: String required', exc_exec('call executable('..input..')'))
eq('Vim(call):E1174: String required for argument 1',
exc_exec('call executable('..input..')'))
end
end)