mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
vim-patch:8.2.4890: inconsistent capitalization in error messages
Problem: Inconsistent capitalization in error messages.
Solution: Make capitalization consistent. (Doug Kearns)
cf030578b2
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -93,13 +93,13 @@ describe('execute()', function()
|
||||
it('captures errors', function()
|
||||
local ret
|
||||
ret = exc_exec('call execute(0.0)')
|
||||
eq('Vim(call):E806: using Float as a String', ret)
|
||||
eq('Vim(call):E806: Using Float as a String', ret)
|
||||
ret = exc_exec('call execute(v:_null_dict)')
|
||||
eq('Vim(call):E731: Using a Dictionary as a String', ret)
|
||||
ret = exc_exec('call execute(function("tr"))')
|
||||
eq('Vim(call):E729: Using a Funcref as a String', ret)
|
||||
ret = exc_exec('call execute(["echo 42", 0.0, "echo 44"])')
|
||||
eq('Vim:E806: using Float as a String', ret)
|
||||
eq('Vim:E806: Using Float as a String', ret)
|
||||
ret = exc_exec('call execute(["echo 42", v:_null_dict, "echo 44"])')
|
||||
eq('Vim:E731: Using a Dictionary as a String', ret)
|
||||
ret = exc_exec('call execute(["echo 42", function("tr"), "echo 44"])')
|
||||
@@ -322,7 +322,7 @@ describe('execute()', function()
|
||||
it('propagates errors for "" and "silent"', function()
|
||||
local ret
|
||||
ret = exc_exec('call execute(0.0, "")')
|
||||
eq('Vim(call):E806: using Float as a String', ret)
|
||||
eq('Vim(call):E806: Using Float as a String', ret)
|
||||
|
||||
ret = exc_exec('call execute(v:_null_dict, "silent")')
|
||||
eq('Vim(call):E731: Using a Dictionary as a String', ret)
|
||||
|
||||
@@ -246,9 +246,9 @@ describe('mapset()', function()
|
||||
end)
|
||||
|
||||
it('does not leak memory if lhs is missing', function()
|
||||
eq('Vim:E460: entries missing in mapset() dict argument',
|
||||
eq('Vim:E460: Entries missing in mapset() dict argument',
|
||||
pcall_err(exec_lua, [[vim.fn.mapset('n', false, {rhs = 'foo'})]]))
|
||||
eq('Vim:E460: entries missing in mapset() dict argument',
|
||||
eq('Vim:E460: Entries missing in mapset() dict argument',
|
||||
pcall_err(exec_lua, [[vim.fn.mapset('n', false, {callback = function() end})]]))
|
||||
end)
|
||||
end)
|
||||
|
||||
@@ -65,7 +65,7 @@ describe('NULL', function()
|
||||
|
||||
-- Correct behaviour
|
||||
null_expr_test('can be indexed with error message for empty list', 'L[0]',
|
||||
'E684: list index out of range: 0', nil)
|
||||
'E684: List index out of range: 0', nil)
|
||||
null_expr_test('can be splice-indexed', 'L[:]', 0, {})
|
||||
null_expr_test('is not locked', 'islocked("v:_null_list")', 0, 0)
|
||||
null_test('is accepted by :for', 'for x in L|throw x|endfor', 0)
|
||||
@@ -80,7 +80,7 @@ describe('NULL', function()
|
||||
null_expr_test('can be copied', 'copy(L)', 0, {})
|
||||
null_expr_test('can be deepcopied', 'deepcopy(L)', 0, {})
|
||||
null_expr_test('does not crash when indexed', 'L[1]',
|
||||
'E684: list index out of range: 1', nil)
|
||||
'E684: List index out of range: 1', nil)
|
||||
null_expr_test('does not crash call()', 'call("arglistid", L)', 0, 0)
|
||||
null_expr_test('does not crash col()', 'col(L)', 0, 0)
|
||||
null_expr_test('does not crash virtcol()', 'virtcol(L)', 0, 0)
|
||||
|
||||
@@ -145,7 +145,7 @@ describe('writefile()', function()
|
||||
pcall_err(command, ('call writefile(%s, "%s", "b")'):format(arg, fname)))
|
||||
end
|
||||
for _, args in ipairs({'[], %s, "b"', '[], "' .. fname .. '", %s'}) do
|
||||
eq('Vim(call):E806: using Float as a String',
|
||||
eq('Vim(call):E806: Using Float as a String',
|
||||
pcall_err(command, ('call writefile(%s)'):format(args:format('0.0'))))
|
||||
eq('Vim(call):E730: Using a List as a String',
|
||||
pcall_err(command, ('call writefile(%s)'):format(args:format('[]'))))
|
||||
|
||||
Reference in New Issue
Block a user