mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 07:48:18 +00:00
eval,functests: Fix linter errors
This commit is contained in:
@@ -12363,8 +12363,8 @@ static void f_input(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
|||||||
argvars[1].v_type != VAR_UNKNOWN && argvars[2].v_type != VAR_UNKNOWN
|
argvars[1].v_type != VAR_UNKNOWN && argvars[2].v_type != VAR_UNKNOWN
|
||||||
? (const char *)get_tv_string_buf(&argvars[2], (char_u *)xp_name_buf)
|
? (const char *)get_tv_string_buf(&argvars[2], (char_u *)xp_name_buf)
|
||||||
: NULL);
|
: NULL);
|
||||||
if (prompt == NULL || initval == NULL || (
|
if (prompt == NULL || initval == NULL
|
||||||
argvars[1].v_type != VAR_UNKNOWN && argvars[2].v_type != VAR_UNKNOWN
|
|| (argvars[1].v_type != VAR_UNKNOWN && argvars[2].v_type != VAR_UNKNOWN
|
||||||
&& xp_name == NULL)) {
|
&& xp_name == NULL)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -12389,8 +12389,8 @@ static void f_inputdialog(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
|||||||
argvars[1].v_type != VAR_UNKNOWN && argvars[2].v_type != VAR_UNKNOWN
|
argvars[1].v_type != VAR_UNKNOWN && argvars[2].v_type != VAR_UNKNOWN
|
||||||
? (const char *)get_tv_string_buf(&argvars[2], (char_u *)cancelval_buf)
|
? (const char *)get_tv_string_buf(&argvars[2], (char_u *)cancelval_buf)
|
||||||
: NULL);
|
: NULL);
|
||||||
if (prompt == NULL || initval == NULL || (
|
if (prompt == NULL || initval == NULL
|
||||||
argvars[1].v_type != VAR_UNKNOWN && argvars[2].v_type != VAR_UNKNOWN
|
|| (argvars[1].v_type != VAR_UNKNOWN && argvars[2].v_type != VAR_UNKNOWN
|
||||||
&& cancelval == NULL)) {
|
&& cancelval == NULL)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -79,14 +79,13 @@ describe('debug.debug', function()
|
|||||||
})
|
})
|
||||||
end)
|
end)
|
||||||
it('works', function()
|
it('works', function()
|
||||||
write_file(fname, [[
|
command([[lua
|
||||||
function Test(a)
|
function Test(a)
|
||||||
print(a)
|
print(a)
|
||||||
debug.debug()
|
debug.debug()
|
||||||
print(a * 100)
|
print(a * 100)
|
||||||
end
|
end
|
||||||
]])
|
]])
|
||||||
eq('', redir_exec('luafile ' .. fname))
|
|
||||||
feed(':lua Test()\n')
|
feed(':lua Test()\n')
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
{0:~ }|
|
{0:~ }|
|
||||||
@@ -133,9 +132,9 @@ describe('debug.debug', function()
|
|||||||
lua_debug> print("TEST") |
|
lua_debug> print("TEST") |
|
||||||
TEST |
|
TEST |
|
||||||
|
|
|
|
||||||
{E:E5105: Error while calling lua chunk: Xtest-functiona}|
|
{E:E5105: Error while calling lua chunk: [string "<VimL }|
|
||||||
{E:l-lua-overrides-luafile:4: attempt to perform arithme}|
|
{E:compiled string>"]:5: attempt to perform arithmetic o}|
|
||||||
{E:tic on local 'a' (a nil value)} |
|
{E:n local 'a' (a nil value)} |
|
||||||
Interrupt: {cr:Press ENTER or type command to continue}^ |
|
Interrupt: {cr:Press ENTER or type command to continue}^ |
|
||||||
]])
|
]])
|
||||||
feed('<C-l>:lua Test()\n')
|
feed('<C-l>:lua Test()\n')
|
||||||
@@ -167,9 +166,9 @@ describe('debug.debug', function()
|
|||||||
{0:~ }|
|
{0:~ }|
|
||||||
nil |
|
nil |
|
||||||
lua_debug> |
|
lua_debug> |
|
||||||
{E:E5105: Error while calling lua chunk: Xtest-functiona}|
|
{E:E5105: Error while calling lua chunk: [string "<VimL }|
|
||||||
{E:l-lua-overrides-luafile:4: attempt to perform arithme}|
|
{E:compiled string>"]:5: attempt to perform arithmetic o}|
|
||||||
{E:tic on local 'a' (a nil value)} |
|
{E:n local 'a' (a nil value)} |
|
||||||
{cr:Press ENTER or type command to continue}^ |
|
{cr:Press ENTER or type command to continue}^ |
|
||||||
]])
|
]])
|
||||||
end)
|
end)
|
||||||
|
Reference in New Issue
Block a user