mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
vim-patch:8.1.1336: some eval functionality is not covered by tests
Problem: Some eval functionality is not covered by tests.
Solution: Add a few more test cases. (Masato Nishihata, closes vim/vim#4374)
17aca707f9
Test_expand() changes are required for v8.1.1921.
Test_call() and Test_cindent_func() are already ported.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
local helpers = require('test.functional.helpers')(after_each)
|
||||
local clear, source = helpers.clear, helpers.source
|
||||
local eq, eval, command = helpers.eq, helpers.eval, helpers.command
|
||||
local exc_exec = helpers.exc_exec
|
||||
|
||||
describe('Test for delete()', function()
|
||||
before_each(clear)
|
||||
@@ -114,4 +115,10 @@ describe('Test for delete()', function()
|
||||
eq(0, eval("delete('Xdir4/Xfile')"))
|
||||
eq(0, eval("delete('Xdir4', 'd')"))
|
||||
end)
|
||||
|
||||
it('gives correct emsgs', function()
|
||||
eq('Vim(call):E474: Invalid argument', exc_exec("call delete('')"))
|
||||
eq('Vim(call):E15: Invalid expression: 0',
|
||||
exc_exec("call delete('foo', 0)"))
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user