mirror of
https://github.com/neovim/neovim.git
synced 2026-01-04 02:17:09 +10:00
test: improve test conventions
Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004.
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
local t = require('test.functional.testutil')()
|
||||
local t = require('test.testutil')
|
||||
local n = require('test.functional.testnvim')()
|
||||
local Screen = require('test.functional.ui.screen')
|
||||
|
||||
local eq = t.eq
|
||||
local exec_lua = t.exec_lua
|
||||
local clear = t.clear
|
||||
local feed = t.feed
|
||||
local fn = t.fn
|
||||
local exec_lua = n.exec_lua
|
||||
local clear = n.clear
|
||||
local feed = n.feed
|
||||
local fn = n.fn
|
||||
local assert_log = t.assert_log
|
||||
local check_close = t.check_close
|
||||
local check_close = n.check_close
|
||||
|
||||
local testlog = 'Xtest_lua_ui_event_log'
|
||||
|
||||
@@ -112,7 +114,7 @@ describe('vim.ui_attach', function()
|
||||
|
||||
it('does not crash on exit', function()
|
||||
fn.system({
|
||||
t.nvim_prog,
|
||||
n.nvim_prog,
|
||||
'-u',
|
||||
'NONE',
|
||||
'-i',
|
||||
@@ -124,7 +126,7 @@ describe('vim.ui_attach', function()
|
||||
'--cmd',
|
||||
'quitall!',
|
||||
})
|
||||
eq(0, t.eval('v:shell_error'))
|
||||
eq(0, n.eval('v:shell_error'))
|
||||
end)
|
||||
|
||||
it('can receive accurate message kinds even if they are history', function()
|
||||
|
||||
Reference in New Issue
Block a user