aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-04-11 08:51:06 +0800
committerGitHub <noreply@github.com>2024-04-11 08:51:06 +0800
commit4528a69c8772a5fe182fb293b929dfcfad112abc (patch)
tree3ba275d5be425811b1e82ec5f956758d4cabd08d
parent509c053161c0495ac41cf12343089059afb4e813 (diff)
downloadrneovim-4528a69c8772a5fe182fb293b929dfcfad112abc.tar.gz
rneovim-4528a69c8772a5fe182fb293b929dfcfad112abc.tar.bz2
rneovim-4528a69c8772a5fe182fb293b929dfcfad112abc.zip
test: remove unnecessary nil argument to testutil (#28270)
-rw-r--r--test/functional/plugin/lsp/testutil.lua2
-rw-r--r--test/functional/preload.lua2
-rw-r--r--test/functional/provider/define_spec.lua2
-rw-r--r--test/functional/shada/testutil.lua2
-rw-r--r--test/functional/terminal/testutil.lua4
-rw-r--r--test/functional/testutil.lua1
-rw-r--r--test/functional/ui/embed_spec.lua2
-rw-r--r--test/functional/ui/output_spec.lua2
-rw-r--r--test/functional/ui/screen.lua2
9 files changed, 9 insertions, 10 deletions
diff --git a/test/functional/plugin/lsp/testutil.lua b/test/functional/plugin/lsp/testutil.lua
index 7dc7bd9925..c51ccf3097 100644
--- a/test/functional/plugin/lsp/testutil.lua
+++ b/test/functional/plugin/lsp/testutil.lua
@@ -1,4 +1,4 @@
-local t = require('test.functional.testutil')(nil)
+local t = require('test.functional.testutil')()
local clear = t.clear
local exec_lua = t.exec_lua
diff --git a/test/functional/preload.lua b/test/functional/preload.lua
index 9f17ecd66c..24e528bc5b 100644
--- a/test/functional/preload.lua
+++ b/test/functional/preload.lua
@@ -1,7 +1,7 @@
-- Modules loaded here will NOT be cleared and reloaded by Busted.
-- Busted started doing this to help provide more isolation. See issue #62
-- for more information about this.
-local t = require('test.functional.testutil')(nil)
+local t = require('test.functional.testutil')()
require('test.functional.ui.screen')
local is_os = t.is_os
diff --git a/test/functional/provider/define_spec.lua b/test/functional/provider/define_spec.lua
index 78494c45b4..f0d47cae16 100644
--- a/test/functional/provider/define_spec.lua
+++ b/test/functional/provider/define_spec.lua
@@ -28,7 +28,7 @@ local function runx(sync, handler, on_setup)
local function setup_cb(...)
on_setup(...)
-- 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
stop()
end
diff --git a/test/functional/shada/testutil.lua b/test/functional/shada/testutil.lua
index 9cf81ec87b..286a7a8e21 100644
--- a/test/functional/shada/testutil.lua
+++ b/test/functional/shada/testutil.lua
@@ -1,4 +1,4 @@
-local t = require('test.functional.testutil')(nil)
+local t = require('test.functional.testutil')()
local api = t.api
local write_file = t.write_file
local concat_tables = t.concat_tables
diff --git a/test/functional/terminal/testutil.lua b/test/functional/terminal/testutil.lua
index 878b3bf409..c5e5ed5e96 100644
--- a/test/functional/terminal/testutil.lua
+++ b/test/functional/terminal/testutil.lua
@@ -1,7 +1,7 @@
-- 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.
-local t = require('test.functional.testutil')(nil)
+local t = require('test.functional.testutil')()
local Screen = require('test.functional.ui.screen')
local testprg = t.testprg
local exec_lua = t.exec_lua
diff --git a/test/functional/testutil.lua b/test/functional/testutil.lua
index 1ab15053db..9bf574f14d 100644
--- a/test/functional/testutil.lua
+++ b/test/functional/testutil.lua
@@ -1042,7 +1042,6 @@ return function()
before_each(function()
local id = ('T%d'):format(testid())
_G._nvim_test_id = id
- return nil, true
end)
end
diff --git a/test/functional/ui/embed_spec.lua b/test/functional/ui/embed_spec.lua
index c10781e792..934f00b288 100644
--- a/test/functional/ui/embed_spec.lua
+++ b/test/functional/ui/embed_spec.lua
@@ -233,7 +233,7 @@ describe('--embed UI', function()
}
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
-- a test with an explicit override like below, so do it to remain safe.
startup('--cmd', 'hi NORMAL guibg=#FF00FF')
diff --git a/test/functional/ui/output_spec.lua b/test/functional/ui/output_spec.lua
index c8315e99b5..b09f1e0d03 100644
--- a/test/functional/ui/output_spec.lua
+++ b/test/functional/ui/output_spec.lua
@@ -81,7 +81,7 @@ describe('shell command :!', function()
{3:-- TERMINAL --} |
]],
{
- -- test/functional/t.lua defaults to background=light.
+ -- test/functional/testutil.lua defaults to background=light.
[1] = { reverse = true },
[3] = { bold = true },
[10] = { foreground = 2 },
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua
index b08a5b93a6..a9b3fb80d3 100644
--- a/test/functional/ui/screen.lua
+++ b/test/functional/ui/screen.lua
@@ -70,7 +70,7 @@
-- To help write screen tests, see Screen:snapshot_util().
-- 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 deepcopy = vim.deepcopy
local shallowcopy = t.shallowcopy