From 0193b3a3917d426bb5798759c3629e9d4f3eb7a8 Mon Sep 17 00:00:00 2001 From: Sean Dewar Date: Fri, 27 Aug 2021 22:07:34 +0100 Subject: 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) https://github.com/vim/vim/commit/17aca707f92235b6f962e637e8073162d18e6de2 Test_expand() changes are required for v8.1.1921. Test_call() and Test_cindent_func() are already ported. --- test/functional/legacy/delete_spec.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/functional/legacy/delete_spec.lua') diff --git a/test/functional/legacy/delete_spec.lua b/test/functional/legacy/delete_spec.lua index f2ced8942d..b4ed8ff136 100644 --- a/test/functional/legacy/delete_spec.lua +++ b/test/functional/legacy/delete_spec.lua @@ -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) -- cgit