mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 05:28:33 +00:00
test: remove unnecessary nil argument to testutil (#28270)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
local t = require('test.functional.testutil')(nil)
|
local t = require('test.functional.testutil')()
|
||||||
|
|
||||||
local clear = t.clear
|
local clear = t.clear
|
||||||
local exec_lua = t.exec_lua
|
local exec_lua = t.exec_lua
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
-- Modules loaded here will NOT be cleared and reloaded by Busted.
|
-- Modules loaded here will NOT be cleared and reloaded by Busted.
|
||||||
-- Busted started doing this to help provide more isolation. See issue #62
|
-- Busted started doing this to help provide more isolation. See issue #62
|
||||||
-- for more information about this.
|
-- for more information about this.
|
||||||
local t = require('test.functional.testutil')(nil)
|
local t = require('test.functional.testutil')()
|
||||||
require('test.functional.ui.screen')
|
require('test.functional.ui.screen')
|
||||||
local is_os = t.is_os
|
local is_os = t.is_os
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ local function runx(sync, handler, on_setup)
|
|||||||
local function setup_cb(...)
|
local function setup_cb(...)
|
||||||
on_setup(...)
|
on_setup(...)
|
||||||
-- need to stop on setup callback because there's two session:request
|
-- need to stop on setup callback because there's two session:request
|
||||||
-- calls in `request/t.lua`. The second call will always return
|
-- calls in `request/testutil.lua`. The second call will always return
|
||||||
-- after pending notification/request callbacks are processed
|
-- after pending notification/request callbacks are processed
|
||||||
stop()
|
stop()
|
||||||
end
|
end
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
local t = require('test.functional.testutil')(nil)
|
local t = require('test.functional.testutil')()
|
||||||
local api = t.api
|
local api = t.api
|
||||||
local write_file = t.write_file
|
local write_file = t.write_file
|
||||||
local concat_tables = t.concat_tables
|
local concat_tables = t.concat_tables
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
-- To test tui/input.c, this module spawns `nvim` inside :terminal and sends
|
-- To test tui/input.c, this module spawns `nvim` inside :terminal and sends
|
||||||
-- bytes via jobsend(). Note: the functional/t.lua test-session methods
|
-- bytes via jobsend(). Note: the functional/testutil.lua test-session methods
|
||||||
-- operate on the _host_ session, _not_ the child session.
|
-- operate on the _host_ session, _not_ the child session.
|
||||||
local t = require('test.functional.testutil')(nil)
|
local t = require('test.functional.testutil')()
|
||||||
local Screen = require('test.functional.ui.screen')
|
local Screen = require('test.functional.ui.screen')
|
||||||
local testprg = t.testprg
|
local testprg = t.testprg
|
||||||
local exec_lua = t.exec_lua
|
local exec_lua = t.exec_lua
|
||||||
|
@@ -1042,7 +1042,6 @@ return function()
|
|||||||
before_each(function()
|
before_each(function()
|
||||||
local id = ('T%d'):format(testid())
|
local id = ('T%d'):format(testid())
|
||||||
_G._nvim_test_id = id
|
_G._nvim_test_id = id
|
||||||
return nil, true
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -233,7 +233,7 @@ describe('--embed UI', function()
|
|||||||
}
|
}
|
||||||
eq({ [16777215] = true }, seen)
|
eq({ [16777215] = true }, seen)
|
||||||
|
|
||||||
-- NB: by accident how functional/t.lua currently handles the default color scheme, the
|
-- NB: by accident how functional/testutil.lua currently handles the default color scheme, the
|
||||||
-- above is sufficient to test the behavior. But in case that workaround is removed, we need
|
-- above is sufficient to test the behavior. But in case that workaround is removed, we need
|
||||||
-- a test with an explicit override like below, so do it to remain safe.
|
-- a test with an explicit override like below, so do it to remain safe.
|
||||||
startup('--cmd', 'hi NORMAL guibg=#FF00FF')
|
startup('--cmd', 'hi NORMAL guibg=#FF00FF')
|
||||||
|
@@ -81,7 +81,7 @@ describe('shell command :!', function()
|
|||||||
{3:-- TERMINAL --} |
|
{3:-- TERMINAL --} |
|
||||||
]],
|
]],
|
||||||
{
|
{
|
||||||
-- test/functional/t.lua defaults to background=light.
|
-- test/functional/testutil.lua defaults to background=light.
|
||||||
[1] = { reverse = true },
|
[1] = { reverse = true },
|
||||||
[3] = { bold = true },
|
[3] = { bold = true },
|
||||||
[10] = { foreground = 2 },
|
[10] = { foreground = 2 },
|
||||||
|
@@ -70,7 +70,7 @@
|
|||||||
-- To help write screen tests, see Screen:snapshot_util().
|
-- To help write screen tests, see Screen:snapshot_util().
|
||||||
-- To debug screen tests, see Screen:redraw_debug().
|
-- To debug screen tests, see Screen:redraw_debug().
|
||||||
|
|
||||||
local t = require('test.functional.testutil')(nil)
|
local t = require('test.functional.testutil')()
|
||||||
local busted = require('busted')
|
local busted = require('busted')
|
||||||
local deepcopy = vim.deepcopy
|
local deepcopy = vim.deepcopy
|
||||||
local shallowcopy = t.shallowcopy
|
local shallowcopy = t.shallowcopy
|
||||||
|
Reference in New Issue
Block a user