vim-patch:8.2.0404: writefile() error does not give a hint

Problem:    Writefile() error does not give a hint.
Solution:   Add remark about first argument.
18a2b87ca2
This commit is contained in:
Sean Dewar
2021-08-02 15:27:06 +01:00
parent 53f28f024c
commit ba34afb378
3 changed files with 5 additions and 2 deletions

View File

@@ -119,7 +119,7 @@ describe('writefile()', function()
eq('\nE118: Too many arguments for function: writefile',
redir_exec(('call writefile([], "%s", "b", 1)'):format(fname)))
for _, arg in ipairs({'0', '0.0', 'function("tr")', '{}', '"test"'}) do
eq('\nE475: Invalid argument: writefile()',
eq('\nE475: Invalid argument: writefile() first argument must be a List or a Blob',
redir_exec(('call writefile(%s, "%s", "b")'):format(arg, fname)))
end
for _, args in ipairs({'[], %s, "b"', '[], "' .. fname .. '", %s'}) do