neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 4528a69c8772a5fe182fb293b929dfcfad112abc
parent 509c053161c0495ac41cf12343089059afb4e813
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Thu, 11 Apr 2024 08:51:06 +0800

test: remove unnecessary nil argument to testutil (#28270)


Diffstat:
Mtest/functional/plugin/lsp/testutil.lua | 2+-
Mtest/functional/preload.lua | 2+-
Mtest/functional/provider/define_spec.lua | 2+-
Mtest/functional/shada/testutil.lua | 2+-
Mtest/functional/terminal/testutil.lua | 4++--
Mtest/functional/testutil.lua | 1-
Mtest/functional/ui/embed_spec.lua | 2+-
Mtest/functional/ui/output_spec.lua | 2+-
Mtest/functional/ui/screen.lua | 2+-
9 files changed, 9 insertions(+), 10 deletions(-)

diff --git 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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