mirror of
https://github.com/neovim/neovim.git
synced 2026-04-20 22:35:33 +00:00
test/functional: clean up according to luacheck (part 2)
This commit is contained in:
@@ -19,7 +19,7 @@ describe("update_menu notification", function()
|
||||
screen:detach()
|
||||
end)
|
||||
|
||||
function expect_sent(expected)
|
||||
local function expect_sent(expected)
|
||||
screen:wait(function()
|
||||
if screen.update_menu ~= expected then
|
||||
if expected then
|
||||
|
||||
@@ -95,13 +95,13 @@ describe('server -> client', function()
|
||||
eq('notified!', eval('rpcrequest('..cid..', "notify")'))
|
||||
end
|
||||
|
||||
local function on_request(method, args)
|
||||
local function on_request(method)
|
||||
eq('notify', method)
|
||||
eq(1, eval('rpcnotify('..cid..', "notification")'))
|
||||
return 'notified!'
|
||||
end
|
||||
|
||||
local function on_notification(method, args)
|
||||
local function on_notification(method)
|
||||
eq('notification', method)
|
||||
if notified == expected then
|
||||
stop()
|
||||
|
||||
@@ -180,6 +180,8 @@ describe('vim_* functions', function()
|
||||
end)
|
||||
|
||||
describe('err_write', function()
|
||||
local screen
|
||||
|
||||
before_each(function()
|
||||
clear()
|
||||
screen = Screen.new(40, 8)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- Sanity checks for window_* API calls via msgpack-rpc
|
||||
local helpers = require('test.functional.helpers')
|
||||
local clear, nvim, buffer, curbuf, curbuf_contents, window, curwin, eq, neq,
|
||||
ok, feed, rawfeed, insert, eval = helpers.clear, helpers.nvim, helpers.buffer, helpers.curbuf,
|
||||
local clear, nvim, curbuf, curbuf_contents, window, curwin, eq, neq,
|
||||
ok, feed, insert, eval = helpers.clear, helpers.nvim, helpers.curbuf,
|
||||
helpers.curbuf_contents, helpers.window, helpers.curwin, helpers.eq,
|
||||
helpers.neq, helpers.ok, helpers.feed, helpers.rawfeed, helpers.insert, helpers.eval
|
||||
helpers.neq, helpers.ok, helpers.feed, helpers.insert, helpers.eval
|
||||
local wait = helpers.wait
|
||||
|
||||
-- check if str is visible at the beginning of some line
|
||||
@@ -54,7 +54,7 @@ describe('window_* functions', function()
|
||||
insert("prologue")
|
||||
feed('100o<esc>')
|
||||
insert("epilogue")
|
||||
win = curwin()
|
||||
local win = curwin()
|
||||
feed('gg')
|
||||
wait() -- let nvim process the 'gg' command
|
||||
|
||||
|
||||
Reference in New Issue
Block a user